location not supported for Android Wi-Fi only devices?

I am building a location aware application and I’ve found that my Samsung Galaxy TAB 2 (GT-P3113) isn’t calling the location listener.  I went back to the sample application GPS and I see it does not work there as well.  I have an HTC Incredible that works fine for the exact same code.

I can see in the logs the following calls, but I never get anything in the location listener:

D/LocationManagerService(  489): request 43049a10 gps Request[ACCURACY_FINE gps requested=+1s0ms fastest=+1s0ms] from com.mytestapp.bob.GPS(10110)

D/LocationManagerService(  489): provider request: gps ProviderRequest[ON interval=+1s0ms]

D/GpsLocationProvider(  489): setRequest ProviderRequest[ON interval=+1s0ms]

D/GpsLocationProvider(  489): startNavigating

D/LocationManagerService(  489): request 43049a10 network Request[POWER_LOW network requested=+1s0ms fastest=+1s0ms] from com.mytestapp.bob.GPS(10110)

E/GpsLocationProvider(  489): mPositionMode set to GPS_POSITION_MODE_STANDALONE because of WiFi only model.

I/libgps  (  489): disarming wakeLockTimer

D/libgps  (  489): proxy_gps_status_cb: called. status(3)

D/libgps  (  489): proxy_gps_status_cb: normal GPS icon mode.

V/GpsLocationProvider(  489): reportStatus status: 3

I/libgps  (  489): disarming wakeLockTimer

I/libgps  (  489): [proxy_gps_acquire_wakelock_cb][line = 652]: acquire_wakelock(1)

D/GpsLocationProvider(  489): getSKAFEnable : false

D/libgps  (  489): proxy_gps_status_cb: called. status(1)

D/libgps  (  489): proxy_gps_status_cb: normal GPS icon mode.

V/GpsLocationProvider(  489): reportStatus status: 1

D/GpsLocationProvider(  489): send an intent to notify that the GPS has been enabled or disabled mNavigating = true

 

 

Does corona not support location events for wifi only Android devices?   The sample application “MapView” fails as well.

 

Corona Build: 2014.2307 (2014.5.17)

Your tablet’s “Location Services” is probably disabled.  Double check under your tablet’s “Settings” screen that it is enabled.

You should also verify that your tablet can access the Internet and acquire location via WiFi from other apps as well, such as the Google Maps app.  A GPS icon typically appears in the top status bar once the app (such as Google Maps) turns on location services.

Yes – this device works fine with google maps.  In my application I do see the GPS icon flashing, but there’s no call back to the listener.  The sample apps (GPS and MapView) hide the status bar icons, but they also fail to work on this device.  Everything does appear to work fine on several other phones (that have GPS hardware).  So far it is just this tablet that isn’t working.

I just tested the GPS sample application on a Kindle Fire HD and everything works as expected.

Are there any particular log messages that would be helpful to diagnose this issue?

We’ll give it a quick test on our Galaxy Tab 2 today.

I’m quite positive Corona is able to acquire location from a device that doesn’t have a GPS.  For example, it worked on your Kindle Fire HD.  But I also remember it not working initially on a Kindle Fire HD due to a bug on the device that Amazon later patched.  I’m curious if we’re running into a firmware bug with the Galaxy Tab 2 as well.  We’ll find out soon enough.

Thanks for looking into this!  

We looked into this and discovered that this is indeed an issue on a Galaxy Tab 2.

But… Corona does successfully fetch location from WiFi from a Kindle Fire HD 7" tablet which does not have GPS hardware.

Corona also successfully fetches current location from WiFi from a Nexus 7 with the GPS turned off.

So, this looks like a firmware bug on the Galaxy Tab.  Probably a forked version of the Android OS that’s not quite following the rules.  But we’ll still write it up as a bug for us to work-around later, because other apps such as Google Maps are able to work-around it.

In the meantime, I suppose the only work-around you can do on your end is to either exclude Galaxy Tab support on Google Play.

Or set up your “build.settings” file to require GPS hardware as shown here…

   http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#features

Thanks for the additional investigation

Your tablet’s “Location Services” is probably disabled.  Double check under your tablet’s “Settings” screen that it is enabled.

You should also verify that your tablet can access the Internet and acquire location via WiFi from other apps as well, such as the Google Maps app.  A GPS icon typically appears in the top status bar once the app (such as Google Maps) turns on location services.

Yes – this device works fine with google maps.  In my application I do see the GPS icon flashing, but there’s no call back to the listener.  The sample apps (GPS and MapView) hide the status bar icons, but they also fail to work on this device.  Everything does appear to work fine on several other phones (that have GPS hardware).  So far it is just this tablet that isn’t working.

I just tested the GPS sample application on a Kindle Fire HD and everything works as expected.

Are there any particular log messages that would be helpful to diagnose this issue?

We’ll give it a quick test on our Galaxy Tab 2 today.

I’m quite positive Corona is able to acquire location from a device that doesn’t have a GPS.  For example, it worked on your Kindle Fire HD.  But I also remember it not working initially on a Kindle Fire HD due to a bug on the device that Amazon later patched.  I’m curious if we’re running into a firmware bug with the Galaxy Tab 2 as well.  We’ll find out soon enough.

Thanks for looking into this!  

We looked into this and discovered that this is indeed an issue on a Galaxy Tab 2.

But… Corona does successfully fetch location from WiFi from a Kindle Fire HD 7" tablet which does not have GPS hardware.

Corona also successfully fetches current location from WiFi from a Nexus 7 with the GPS turned off.

So, this looks like a firmware bug on the Galaxy Tab.  Probably a forked version of the Android OS that’s not quite following the rules.  But we’ll still write it up as a bug for us to work-around later, because other apps such as Google Maps are able to work-around it.

In the meantime, I suppose the only work-around you can do on your end is to either exclude Galaxy Tab support on Google Play.

Or set up your “build.settings” file to require GPS hardware as shown here…

   http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#features

Thanks for the additional investigation