Hello,
I have built an android cordova app. I copied the files from the Led On/Off TCP example to the www folder, build the app from cmd, and copied the created apk file to my phone. The UI works perfectly fine but when i enter the IP of my arduino and press connect, nothing happens.
I tried this demo using the workbench and the clientapp, and it worked just fine (i was able to turn on the LED...).
And i also added the necessary plugins to my cordova app (org.chromium.socket and org.chromium.sockets.tcp) and re-built the app from cmd, but still when i press connect nothing happens.
Any thoughts or suggestions ?
Thanks in advance
LED ON/OFF TCP CORDOVA. Cannot connect to arduino
-
- Posts: 2
- Joined: 00:12, 17 Apr 2015
Re: LED ON/OFF TCP CORDOVA. Cannot connect to arduino
Just wondering if you are experiencing problem similar to mine.
I found another forum post that seems to be describing similar issues and I posted my question there as well.
Basically i did exactly like you did using the RFduino LED example. The app works when i am using my android tablet as a client but after i built the apk using Cordova and downloaded it on the tablet, the graphics and everything looks great but it is stuck on "Initializing..."
viewtopic.php?f=8&t=1320&p=3693#p3693
I found another forum post that seems to be describing similar issues and I posted my question there as well.
Basically i did exactly like you did using the RFduino LED example. The app works when i am using my android tablet as a client but after i built the apk using Cordova and downloaded it on the tablet, the graphics and everything looks great but it is stuck on "Initializing..."
viewtopic.php?f=8&t=1320&p=3693#p3693
Re: LED ON/OFF TCP CORDOVA. Cannot connect to arduino
Hi,
Perhaps a plugin is missing? One approach to debug this is to make a simple Cordova app and see if that works.
I suggest the "BLE Scan" example as a test case. This example should only need the cordova-ble plugin.
If BLE Scan does not work, there is a new example "Cordova Accelerometer" in the recent release of Evothings Studio 1.2, that can be used to test. Uses the Cordova accelerometer plugin.
Also check that all library files are present.
It is great if you can do logging as mentioned in the other thread, using adb logcat on Android or Xcode on iOS.
Another trick for debugging is to hook up your Cordova app to Evothings Workbench. Then you can log to the Tools window log using hyper.log() see error messages as well. There is a description of how to do this in these articles (overlapping information, providing all for clarity):
http://evothings.com/doc/build/cordova- ... rEvothings
http://evothings.com/hands-on-guide-to- ... g-cordova/
http://evothings.com/cordova-starter-kit/
Very best, Mikael
Perhaps a plugin is missing? One approach to debug this is to make a simple Cordova app and see if that works.
I suggest the "BLE Scan" example as a test case. This example should only need the cordova-ble plugin.
If BLE Scan does not work, there is a new example "Cordova Accelerometer" in the recent release of Evothings Studio 1.2, that can be used to test. Uses the Cordova accelerometer plugin.
Also check that all library files are present.
It is great if you can do logging as mentioned in the other thread, using adb logcat on Android or Xcode on iOS.
Another trick for debugging is to hook up your Cordova app to Evothings Workbench. Then you can log to the Tools window log using hyper.log() see error messages as well. There is a description of how to do this in these articles (overlapping information, providing all for clarity):
http://evothings.com/doc/build/cordova- ... rEvothings
http://evothings.com/hands-on-guide-to- ... g-cordova/
http://evothings.com/cordova-starter-kit/
Very best, Mikael
Re: LED ON/OFF TCP CORDOVA. Cannot connect to arduino
Thank you Mikael,
It took me some time to get back to it and I did try as you suggested.
Surprisingly the "BLE Scan" worked (I generated the apk using cordova and downloaded it into the tablet and it worked; seeing the RFduino)
But the "RFduino LED On/Off" example did not work, as I mentioned earlier, the buttons are visible but the message up top is stuck on "Initializing..." after I downloaded the apk to the tablet.
I have no clue why it is doing that.
One thing that I noticed; the apk files generated by cordova are named always as " MainActivity-debug.apk" is that a problem?
The adb logcat: as I am new to the whole cordova/android development it was not clear for me what I should look for as it continuously prints out messages.
If you don't mind, have you tried to generate apk files for the "RFduino LED On/OFF" example?
Thank you
It took me some time to get back to it and I did try as you suggested.
Surprisingly the "BLE Scan" worked (I generated the apk using cordova and downloaded it into the tablet and it worked; seeing the RFduino)
But the "RFduino LED On/Off" example did not work, as I mentioned earlier, the buttons are visible but the message up top is stuck on "Initializing..." after I downloaded the apk to the tablet.
I have no clue why it is doing that.
One thing that I noticed; the apk files generated by cordova are named always as " MainActivity-debug.apk" is that a problem?
The adb logcat: as I am new to the whole cordova/android development it was not clear for me what I should look for as it continuously prints out messages.
If you don't mind, have you tried to generate apk files for the "RFduino LED On/OFF" example?
Thank you
Return to “Questions and answers”
Who is online
Users browsing this forum: No registered users and 63 guests