Page 1 of 1

How to debug an Android app

Posted: Sun Nov 06, 2016 3:24 pm
by Fred
Hello everyone,

Here is a quick guide to properly debug an Android app, as it can be sometimes difficult to know what happen.

1) You will need Chrome

2) Connect your device and launch the APK on it

2) Enter this URL in Chrome:

Code: Select all

chrome://inspect/#devices
It should list your running APK (must be in debug mode, you can't connect to release APK). Click on 'inspect'.

Then you can reload the main page from Chrome and take a look to the 'console' or 'network' tab to see if something odd happen.

Happy bug hunting :)

Re: How to debug an Android app

Posted: Tue Sep 12, 2017 6:05 pm
by IdeasVacuum
A very useful tool Fred, good tip. 8-)

Re: How to debug an Android app

Posted: Thu Sep 14, 2017 8:54 am
by Fangles
Is there any way to push an app wirelessy to the device?

I currently have a wireless charging receiver plugged in under the molbile case and can't keep just ripping it out to compile and send.

(I need some help to write a simple happy birthday app for my wife as well:):):):)

Re: How to debug an Android app

Posted: Thu Sep 14, 2017 11:58 am
by IdeasVacuum
Hi Fangles
There must be a way but I don't know how to do it. When my phone is connected to the PC via USB, it is charging anyway, so not a problem here.

Other possibilities:
Save the APK to an Android USB stick;
Upload the APK file to your website or virtual drive/cloud and then download it to your phone via the browser (phone in debug mode).

Re: How to debug an Android app

Posted: Fri Sep 15, 2017 12:36 am
by Fangles
IdeasVacuum, there's no problem to upload an apk wirelessy to the phone, I have any number of utilities to do that.

But the problem is that when you compile an APK, spiderbasic expects the phone to be connected via usb and it totally hung, needing task manager to kill it. And it didn't create the apk.

Strangely enough, the next time I relaunched spiderbasic and did that (exact same procedure above) again, this time it didn't hang and DID create the apk.

What a difference in file size this version makes too!!!

My old spiderbasic test code was 24.4 meg in size.
The latest spiderbasic compiles it as 1.52 meg. Yippeee!

Too late to make a happy birthday app for my wife's phone, it's today!! (And I don't yet know what I am doing)

Whoops!! I spoke too soon. My phone's package manager says the apk is corrupt. No idea how, it's just a straight compile and works in the browser. Damnit.

Re: How to debug an Android app

Posted: Fri Sep 15, 2017 8:57 am
by Fred
Be sure to sign it if you don't compile in debug