Testing Location

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
A1Qicks
Posts: 79
Joined: Sat Dec 26, 2015 10:47 am

Testing Location

Post by A1Qicks » Sun Jan 17, 2016 12:43 am

Hey, I'm making a location-based app. It's progressing comfortably, and I want to test it on something with actual sensors.

Unfortunately, the emulators do not (I believe) incorporate this feature, meaning I have to do it on a physical device.

However, LiveCode doesn't seem to be able to see my Nexus 5 when it's plugged in in dev mode. Does it have to be 4.0.3 like the emulator? If so, is there a way around this?

And if not, how is that resolved when actually putting apps out to the app store?

ClipArtGuy
Posts: 230
Joined: Wed Aug 19, 2015 4:29 pm

Re: Testing Location

Post by ClipArtGuy » Sun Jan 17, 2016 2:40 pm

You can compile the app into an APK and "side load" it into your device. One way to do this is to upload your compiled APK to a cloud service like DropBox or Google drive and then install onto your device from there.

A1Qicks
Posts: 79
Joined: Sat Dec 26, 2015 10:47 am

Re: Testing Location

Post by A1Qicks » Sun Jan 17, 2016 5:09 pm

I've tried that, and for some reason I get a "Cannot parse this package" error. No idea how to fix this - tried using file managers and all sorts, no luck.

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: Testing Location

Post by dave.kilroy » Sun Jan 17, 2016 8:19 pm

Hi, it sounds like you need to check the settings on your device...

A while ago Panos wrote a really useful blog https://livecode.com/how-to-deploy-apps ... d-devices/ which included Android build error messages - check out error 5...
5. Parse error : There is a problem parsing the package

This error comes from the Android operating system (OS) when trying to install an app on the device and could be caused by different things. One cause is a corrupted .apk file – an Android Package Kit (APK) file is the file format used for installing software on the Android OS. If you are using LiveCode, however, the .apk cannot be corrupted and so something else must have gone wrong. The most likely cause, if you are using LiveCode, is that a setting on the device prevents the .apk file from being installed.

In order to solve this problem, make sure you have turned on “Allow installation of apps from Unknown Sources” on your device. You can do this by going to the device’s settings menu, selecting “Applications” OR “Security” (on the most recent Android versions) and checking the box of “Unknown Sources” to allow installation of apps from sources other than the Google Play store.
"...this is not the code you are looking for..."

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

Re: Testing Location

Post by jacque » Sun Jan 17, 2016 9:48 pm

A1Qicks wrote:However, LiveCode doesn't seem to be able to see my Nexus 5 when it's plugged in in dev mode. Does it have to be 4.0.3 like the emulator? If so, is there a way around this?
The most recent LC releases require 4.0.3 build tools now; it used to be 2.2. I'd keep both packages installed to be safe. If LC can't see your device then you may not have "USB debugging" turned on in the developer preferences on the phone. If you do have it turned on, and the phone is cabled to your computer, then quit LC and open a terminal window and type:

<path to adb> devices

If adb can't see the device then LiveCode won't see it either. If adb does see it, relaunch LC and see if it appears in the Test Target menu.

That said, I've found that the December Android security update has broken the ability to install a test app directly to the device, even when LC can see the device just fine. I've reported the problem but the team hasn't received the security update yet on any of their phones, so can't track the reason and fix it. I now have to build apps and transfer them manually to the phone, which isn't nearly as convenient.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

A1Qicks
Posts: 79
Joined: Sat Dec 26, 2015 10:47 am

Re: Testing Location

Post by A1Qicks » Sun Jan 17, 2016 10:43 pm

dave.kilroy wrote: In order to solve this problem, make sure you have turned on “Allow installation of apps from Unknown Sources” on your device. You can do this by going to the device’s settings menu, selecting “Applications” OR “Security” (on the most recent Android versions) and checking the box of “Unknown Sources” to allow installation of apps from sources other than the Google Play store.
Irritatingly, I've been through this on multiple forums looking for an answer, and I have that enabled, and I still get the parsing problem.

A1Qicks
Posts: 79
Joined: Sat Dec 26, 2015 10:47 am

Re: Testing Location

Post by A1Qicks » Mon Jan 18, 2016 2:17 pm

It fixed! God knows why, all I did was download a different version of my app and it worked fine. Maybe my phone just needed a restart.

A1Qicks
Posts: 79
Joined: Sat Dec 26, 2015 10:47 am

Re: Testing Location

Post by A1Qicks » Mon Jan 18, 2016 7:48 pm

It wasn't a restart.

If anyone else comes across this problem, it fixes if you ensure you have logo and splash, make the minimum Android requirement a 4.0, and sign for development only. No idea which of those fixed it.

A1Qicks
Posts: 79
Joined: Sat Dec 26, 2015 10:47 am

Re: Testing Location

Post by A1Qicks » Mon Jan 18, 2016 7:51 pm

New issue though.

LiveCode's GPS detector/user doesn't like my Nexus 5's location sensor, it seems. Doesn't detect it, can't use it.

Nexus 5 is pretty much a market standard Android. What DOES the LiveCode location detector work with?

A1Qicks
Posts: 79
Joined: Sat Dec 26, 2015 10:47 am

Re: Testing Location

Post by A1Qicks » Tue Jan 19, 2016 2:16 pm

Going to be trying http://forums.livecode.com/viewtopic.ph ... ble#p97310 as a fix when I'm back at my PC. I have high hopes.

Post Reply

Return to “Android Deployment”