Moving App from my Mac to Android Device

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

jnmediaGAd195
Posts: 58
Joined: Mon Dec 05, 2011 5:35 pm

Moving App from my Mac to Android Device

Post by jnmediaGAd195 » Wed Aug 01, 2012 2:50 am

My iOS app was recently approved by the App Store and I am trying to port it to Android. I downloaded the Android SDK, set the Standalone Settings and got a clean build. How do I copy it onto my Android device for testing? I am using a Mac and used Finder to copy it on to the device but the app wouldn't run. Any help is appreciated.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Moving App from my Mac to Android Device

Post by Mark » Thu Aug 02, 2012 9:26 pm

Hi,

If you have a tablet, sometimes also if you have an Android phone, you might need to put a removable MicroSD card into the device. Now you can connect the device to your Mac. When you connect it, you need to activate USB storage (or whatever it is called on your device) and when you do this you should see a message saying "USB card connected" or similar. Before you disconnect the device, you must deactivate USB storage to avoid damaging your device. I'm not sure, but you might need to turn on USB error debugging as well.

Once you get it working, you might try this just for fun.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

jnmediaGAd195
Posts: 58
Joined: Mon Dec 05, 2011 5:35 pm

Re: Moving App from my Mac to Android Device

Post by jnmediaGAd195 » Fri Aug 03, 2012 12:37 am

Thanks, Mark. I will give this a try. I appreciate the help.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Moving App from my Mac to Android Device

Post by jacque » Fri Aug 03, 2012 1:58 am

A finder copy should be fine. What exactly happens when it won't run? Do you get any error messages?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Moving App from my Mac to Android Device

Post by Mark » Fri Aug 03, 2012 2:03 am

Jacque,

A "Finder copy" is only possible if you can make the SDCard appear in the Finder and that's what my instructions are for.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Moving App from my Mac to Android Device

Post by jacque » Fri Aug 03, 2012 3:33 am

Right, but he said he'd already copied it and it wouldn't run. That makes me think something else is wrong.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jnmediaGAd195
Posts: 58
Joined: Mon Dec 05, 2011 5:35 pm

Re: Moving App from my Mac to Android Device

Post by jnmediaGAd195 » Fri Aug 03, 2012 7:50 pm

When I tried to copy it directly on to the Nook, I got the following error:
This NOOK cannot read this file. it may be an unsupported format.

The icon does not show up. Just a rectangle with a question mark. My app has an apk extension.

I will try the MicroSD card.

Thanks to everyone for your help.

jnmediaGAd195
Posts: 58
Joined: Mon Dec 05, 2011 5:35 pm

Re: Moving App from my Mac to Android Device

Post by jnmediaGAd195 » Fri Aug 03, 2012 8:12 pm

When I connect the Nook tablet, I get the message 'USB Mode - You may now safely move files from your PC to NOOK.'

I copied the app to the MicroSD card and I still get the same error (unsupported format) when I tried to run it.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Moving App from my Mac to Android Device

Post by sturgis » Fri Aug 03, 2012 8:19 pm

Which nook is it?

When you are connected to the nook (usb) if you use terminal and go into

/sdkfolder(wherever you installed the androidsdk)/platform-tools

then run
sudo ./adb devices

does it show the nook? (don't have any emulators running, if a device shows up, then its seeing the nook)

If it does NOT show devices you might stop and start adb.

sudo ./adb kill-server
sudo ./adb start-server

then check devices again

sudo ./adb devices

If it still doesn't show, I read here http://nookdevs.com/ADB_Over_USB_(Nook_Classic) (note that this is for the nook classic) that popping the sdcard out, then back in after a few moments will get the mac to remount the device. (at which point check sudo ./adb devices again) I don't know how safe/unsafe removing the sd card is while connected so <insert disclaimer here>

If you get it to show make sure that you have the device selected in livecode (development menu, test target) and see if you can then use the test button on the device.

If nothing else you may get an informative error back at this point when trying to test. If you still get "unsupported format" then I don't know what to do. Maybe a different processor than supported by rev?

EDIT: I've also noticed that sometimes my kindle goes to sleep while i'm working, connection is lost to adb and when waking doesn't always come back. (which causes an error that I can't for the life of me remember right this sec) During these very very rare instances I have had to disconnect/reconnect the device. (not a big deal)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Moving App from my Mac to Android Device

Post by jacque » Fri Aug 03, 2012 8:32 pm

I was under the impression that Nook locks down its file system and won't accept third-party apps unless the device is rooted. It's been a while since I heard that so maybe it's changed now.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Moving App from my Mac to Android Device

Post by sturgis » Fri Aug 03, 2012 8:45 pm

Don't know about the locked down filesystem.

Just found another possible answer though (if a root is NOT required).

This page http://nookdevs.com/NookColor:adb_wireless points to a way to do a wireless adb connection.

If you have a device showing with adb devices you might try the adb method to install the apk..

sudo ./adb install myfile.apk

and see if it will work that way.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Moving App from my Mac to Android Device

Post by jacque » Sat Aug 04, 2012 6:42 pm

By "locked down" file system I meant that sideloading third party apps wasn't permitted. My info was old, so I just looked it up. The original Nook would not allow sideloading but apparently they now do as long as you've enabled the feature before doing an update to version 1.4.1. If the Nook is already at 1.4.1 and apps won't sideload, you need to roll back to 1.4, enable the feature, and then update again.

I found the info here:
http://liliputing.com/2011/11/how-to-si ... er-ex.html
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Moving App from my Mac to Android Device

Post by sturgis » Sat Aug 04, 2012 6:49 pm

Wow, nothin like making it difficult to dev for a device! Nice link, thx for the info.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Moving App from my Mac to Android Device

Post by jacque » Sat Aug 04, 2012 7:10 pm

Yeah. I knew there was a reason I didn't buy a Nook. :) I have a friend with one and I'd like to give him some of my apps but the last time I looked it up it wasn't possible at all. Reading some of the comments on that web page makes me think it still isn't working for everyone. I did see that there's a way to root the device now though.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jnmediaGAd195
Posts: 58
Joined: Mon Dec 05, 2011 5:35 pm

Re: Moving App from my Mac to Android Device

Post by jnmediaGAd195 » Sun Aug 05, 2012 8:24 pm

I tried the Kindle Fire and I got my app to load on it quite easily. My app runs but the pick lists and graphics from my iOS app aren't working at all. Also, the app seems to get lost and doesn't come back. But at least it runs. :)

Post Reply