Can't test on android device
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 5
- Joined: Tue Jan 08, 2013 12:37 am
Can't test on android device
I have an HTC one x phone and a samsung galaxy 2 tablet. Neither show up as an option to test my app on. I've enabled debugging on both devices. Also, the emulator just shows a black screen when I attempt to test there. I've edited the preferences to target the SDK thing and Java thing too, just like the tutorial showed. I also clicked the checkbox for android in the standalone settings. Does anyone have any suggestions? I am a complete newbie to this, so please keep it as straight forward as possible. Thanks in advance!
Re: Can't test on android device
Welcome Reggie,
Just to make sure there isn't a problem with code, download this example:
http://lessons.runrev.com/s/lessons/m/4 ... on-android
You will have to go through the standalone settings again.
Lets stick to just the emulator for now.
Tell me if that changes things.
Simon
Just to make sure there isn't a problem with code, download this example:
http://lessons.runrev.com/s/lessons/m/4 ... on-android
You will have to go through the standalone settings again.
Lets stick to just the emulator for now.
Tell me if that changes things.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Can't test on android device
When testing with the emulator, skip right over 2.2 and use 2.3 as your test bed. There are some problems with how 2.2 handles sensors that don't exist which can cause the black screen you're talking about. So set the minimum to 2.3 or higher if you haven't already so that you can test in the simulator.
Also, you might go to a command line, find the location of adb (in the android sdk, pretty sure its now in the platform-tools folder)
Once you're in the right location, if you execute the following command while your htc device is connected via usb, it should list information about it.
adb devices
If it lists nothing, then adb needs to be set up to recognize that device. This usually means a driver download and installation, or pointing to an additional repository so that you can download the correct packages. For example. to get my kindle fire going (on mac, but similar steps for windows), I ran android (from the tools folder of the sdk) added the "add on site" as specified by the amazon instruction page I found, once the list of downloadable packages refreshed, I clicked the new kindle stuff and voila' Downloaded and got it all working. (I did restart adb after the fact, hooked up the kindle and checked devices and there it was)
While the steps probably differ, the biggest part is getting adb to recognize your device at which point LC should be able to talk to it.
Having said all that though, you can build a full apk instead (not as easy and seamless) put it in a location so that you can hit it with the browser on your htc, download it, install it and go test away. The test button is REALLy nice though since (as long as you don't have conflicting app designations) you can make a change, hit test, make a change, hit test, and it will just keep replacing the app on the device on the fly.
Also, you might go to a command line, find the location of adb (in the android sdk, pretty sure its now in the platform-tools folder)
Once you're in the right location, if you execute the following command while your htc device is connected via usb, it should list information about it.
adb devices
If it lists nothing, then adb needs to be set up to recognize that device. This usually means a driver download and installation, or pointing to an additional repository so that you can download the correct packages. For example. to get my kindle fire going (on mac, but similar steps for windows), I ran android (from the tools folder of the sdk) added the "add on site" as specified by the amazon instruction page I found, once the list of downloadable packages refreshed, I clicked the new kindle stuff and voila' Downloaded and got it all working. (I did restart adb after the fact, hooked up the kindle and checked devices and there it was)
While the steps probably differ, the biggest part is getting adb to recognize your device at which point LC should be able to talk to it.
Having said all that though, you can build a full apk instead (not as easy and seamless) put it in a location so that you can hit it with the browser on your htc, download it, install it and go test away. The test button is REALLy nice though since (as long as you don't have conflicting app designations) you can make a change, hit test, make a change, hit test, and it will just keep replacing the app on the device on the fly.
-
- Posts: 5
- Joined: Tue Jan 08, 2013 12:37 am
Re: Can't test on android device
Thanks for the quick reply! Switching everything to android 2.3 got the emulator working great. I'll follow your instructions to try and get livecode to recognize my devices. Hopefully I'll report back with great news. Thanks again!
Last edited by reggiebullockBUSLp6T on Thu Jan 10, 2013 3:58 pm, edited 1 time in total.
-
- Posts: 5
- Joined: Tue Jan 08, 2013 12:37 am
Re: Can't test on android device
Hi again,
Still no luck getting LC to test my app on either my phone or tablet. How could I go around it and build a full apk instead? I'm assuming that with the full apk, I can just transfer it via usb to my device, then install the app directly to it? Thanks in advance!
Reggie
Still no luck getting LC to test my app on either my phone or tablet. How could I go around it and build a full apk instead? I'm assuming that with the full apk, I can just transfer it via usb to my device, then install the app directly to it? Thanks in advance!
Reggie
Re: Can't test on android device
TO build an apk, rather than click the test button, go to the file menu and choose "save as standalone application"
And while i've never installed an apk directly to a device over usb, seems like it should work. (Probably place it in the downloads folder, then go in and install it)
If you have a web server, or can email it to yourself that works also. (check email in device, open the attachment)
Did you ever determine if your device was showing up when you run adb devices from the command line? If it is, but you still can't get it to recognize in LC, are you getting an error? Is the button just greyed out? Are you sure you have set the preferences to point to the correct sdk location for android? Hmm actually, nevermind that last because you said you got things working with the simulator (can you test in the simulator ok?)
If you don't mind sharing your exact model of device, maybe I can see if I can find info on getting adb to recognize it.
And while i've never installed an apk directly to a device over usb, seems like it should work. (Probably place it in the downloads folder, then go in and install it)
If you have a web server, or can email it to yourself that works also. (check email in device, open the attachment)
Did you ever determine if your device was showing up when you run adb devices from the command line? If it is, but you still can't get it to recognize in LC, are you getting an error? Is the button just greyed out? Are you sure you have set the preferences to point to the correct sdk location for android? Hmm actually, nevermind that last because you said you got things working with the simulator (can you test in the simulator ok?)
If you don't mind sharing your exact model of device, maybe I can see if I can find info on getting adb to recognize it.
Re: Can't test on android device
Dropbox works great for moving an apk to a device. Build the apk, put it in Dropbox on your computer, open Dropbox on your device and double-click the apk. It will install. It's very easy. The same thing should work for any cloud service like Google Drive or SugarSync.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 5
- Joined: Tue Jan 08, 2013 12:37 am
Re: Can't test on android device
Thanks for all of your help! I'll test out the dropbox option and will report back. Neither of my devices show up when I do the adb.
Re: Can't test on android device
If you're on windows you need to install the android usb thingy too. Run android, it brings up the package manager where you can install and remove packages. Down at the bottom is an "extra" folder. Open that and look or the google usb driver and make sure its installed. Once that is done you probably have to restart adb. (or just restart windows, I forget exactly the commands do restart adb. Something like adb kill-server then adb start-server)
One all that is done, plug in the device and see if it shows up. If not there might be one more step that could solve the issue, but it requires editing a file and putting the vendor id in. Hopefully the vendor id for your devices is already there so you don't have to mess with it.
Of course if you're not on windows ignore all this.
And also of course, the dropbox solution works pretty darn well!
One all that is done, plug in the device and see if it shows up. If not there might be one more step that could solve the issue, but it requires editing a file and putting the vendor id in. Hopefully the vendor id for your devices is already there so you don't have to mess with it.
Of course if you're not on windows ignore all this.
And also of course, the dropbox solution works pretty darn well!
-
- Posts: 5
- Joined: Tue Jan 08, 2013 12:37 am
Re: Can't test on android device
Ok, I will try that too. I'm just having a hard time now getting my app to appear the same way it does when I laid it out in photoshop. I'm starting to think that this software isn't as easy as advertised. But the LC forum is incredible from what I've seen and experienced firsthand.
Re: Can't test on android device
Well, there's LiveCode and then there's Android, and I suspect you'd be having the same problems with the emulator no matter what development software you use. If adb can't see your device, nothing else on the computer can either. I had a terrible time getting an old Archos tablet to mount, it took me three days and a whole bunch of google searches. And devices can be different -- I needed to edit the invisible text file that sturgis mentioned (which was a bear to find.) Then I got a Samsung tablet and it just worked immediately without me doing anything.
So don't judge LiveCode too harshly yet. But feel free to swear at the emulator, maybe I'll learn some new words.
So don't judge LiveCode too harshly yet. But feel free to swear at the emulator, maybe I'll learn some new words.

Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com