Page 1 of 1

Testing on local device- SOLVED

Posted: Sun Dec 19, 2021 6:12 am
by jameshale
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.

Re: Testing on local device

Posted: Sun Dec 19, 2021 10:16 am
by SparkOut
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.

Re: Testing on local device

Posted: Sun Dec 19, 2021 1:32 pm
by jameshale
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.

Re: Testing on local device

Posted: Sun Dec 19, 2021 6:43 pm
by SparkOut
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.

Re: Testing on local device

Posted: Sun Dec 19, 2021 6:57 pm
by mtalluto
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.

Re: Testing on local device

Posted: Mon Dec 20, 2021 12:36 am
by jacque
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.

Re: Testing on local device

Posted: Mon Dec 20, 2021 2:19 am
by jameshale
@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!!

Re: Testing on local device- SOLVED

Posted: Mon Dec 20, 2021 5:05 am
by jacque
Yay! As I understand it, there are data cables and charging-only cables and never the twain shall meet.

Re: Testing on local device- SOLVED

Posted: Wed Dec 29, 2021 3:20 am
by Jim Mac
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....