2

I am using a Kindle Fire 2nd Gen which uses WiFi for it's location services.

The problem is I cannot seem to get this in-app. I am using the LocationManager in the version for Google Play which works fine, but for the Kindle it never returns a location just gets stuck using:

locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);

Is this because it is a Google service not available for the Kindle? Is there something else I can use.

I am using MapQuest but do not want to display a map overlay of the users location, I just want the current Lat and Long.

Thanks

Joss Stuart
  • 1,856
  • 1
  • 17
  • 19

1 Answers1

4

I don't believe the kindle has a GPS receiver so you cannot use Android LocationManager with it.

You can use the MyLocationOverlay class which is part of the com.amazon.geo.maps package in the Amazon maps API. The FAQ's are decent and provide some good info.

Also, I haven't used it but Skyhook provides a location SDK that might be useful to you.

Anup Cowkur
  • 20,443
  • 6
  • 51
  • 84
  • 1
    Thanks for the Skyhook suggestion, I used that in the end and it works well. Its frustrating that Amazon do not provide a function for getting the location. Developers don't always want to display the location on the map. For instance I am passing the lat and long into a URL query string to get a JSON feed back and do not need a map. – Joss Stuart Jan 17 '13 at 11:29
  • It is. But I think Amazon wasn't expecting a big use case for the kindle being used as a GPS device. Oh well. I'm glad I could help. Good luck! – Anup Cowkur Jan 17 '13 at 12:41
  • 1
    Yup sorry, completely forgot! Thanks – Joss Stuart Jan 17 '13 at 13:02
  • 2
    You CAN use LocationManager with the Kindle. MyLocationOverlay actually implements the LocationManager class. You can check the Amazon Maps API documentation. You can use LocationManager, but use Network Provider instead of GPS Provider. The fire phone should have GPS so if you're writing Kindle apps you should include both and check for isProviderEnabled(). – xxx Jul 29 '14 at 14:57