Testing on local device- SOLVED

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Testing on local device- SOLVED

Post by jameshale » Sun Dec 19, 2021 6:12 am

Hi All,

Please excuse my ignorance here.
I have bit the bullet and bought an Android device (Samsung Galaxy j3) to test out my app.
I even created a keystore file.
I can successfully build both the aab and apk files.
However, I am not able to get LC to "see" the Samsung when I connect to my Mac.
What's the trick?
Simply plugging it in via USB hasn't worked and I can't find any instructions on this.
When I had previously ran the simulator I could see and select this under the "Development->test target" menu.
The actual device does not appear here.
Last edited by jameshale on Mon Dec 20, 2021 2:19 am, edited 1 time in total.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Testing on local device

Post by SparkOut » Sun Dec 19, 2021 10:16 am

Probably you need to enter developer mode on the phone.
(Settings, About Phone menue. Scroll down and tap on the Build Number seven times. Then you will have Developer Options enabled in settings, and can turn on USB debugging.)
You might also need to change security settings to allow apps from any source, outside the approved store.

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Testing on local device

Post by jameshale » Sun Dec 19, 2021 1:32 pm

Thank @SpakrOut, I had already adjusted the security settings to enable me to install my app from the web.
The Developer mode thing is new to me.
I did as suggested and enabled "developer" mode, turned on USB debugging mode, but LC still can't see the device when plugged in.
In fact, when I hit the Test button LC tells me it can't find the emulator (giving the id num of the last one I used) which is no longer active.
so still nojoy.
At least I can install on the device to try things out.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Testing on local device

Post by SparkOut » Sun Dec 19, 2021 6:43 pm

I think you with also need to ensure that the phone is connected before starting LC so that it appears in the list of test devices.
Also maybe there are usb drivers to install for the phone from the android sdk?
When you do get the phone visible, you will probably also need to accept the popup authorising the phone as a recognised trusted device.
When I get a chance (probably 2023 or so) I will try and hook up computer and phone and check options and settings here.

mtalluto
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 125
Joined: Tue Apr 11, 2006 7:02 pm
Location: Seattle, WA
Contact:

Re: Testing on local device

Post by mtalluto » Sun Dec 19, 2021 6:57 pm

There may be a way. I googled around a few months ago and found that I was not alone with this problem.

I ended up having to connect my android using parallels running windows.
Mark Talluto
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Testing on local device

Post by jacque » Mon Dec 20, 2021 12:36 am

I used to have this problem, it seems to be better now. On the other hand, I have a newer Android phone so that helps. I had to do this in the past:

Quit LC
Cable the phone to the computer, if it isn't already
Launch Terminal
Navigate to the platform-tools folder in the SDK [cd <path to platform-tools>]
Type:
./adb kill-server <cr>
./adb start-server <cr>
./adb devices <cr>

If successful, you'll see the ID number of your phone. Once that works, starting LC again usually made LC see the device. These are Mac instructions, not sure about other platforms.

If you don't see any response to the "devices" command then something else is wrong.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Testing on local device

Post by jameshale » Mon Dec 20, 2021 2:19 am

@jacque
Well this showed me the problem.
It did not show up as a device so I changed the USB cable and tried again.
It showed up!
LC recognizes it and I can test.

Thank you.
moral of story - check the cables!!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Testing on local device- SOLVED

Post by jacque » Mon Dec 20, 2021 5:05 am

Yay! As I understand it, there are data cables and charging-only cables and never the twain shall meet.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Jim Mac
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 54
Joined: Wed Jun 28, 2006 9:22 pm

Re: Testing on local device- SOLVED

Post by Jim Mac » Wed Dec 29, 2021 3:20 am

Just a quick note to say I was bitten by this.
Android File Transfer would not see my device! Had me stumped.
Switched to a different cable and all my troubles went away.

Wish I'd seen this thread before trying every other solution I could think of....

Post Reply

Return to “Android Deployment”