-1

I am writing an services which suggest near by facilities I am using fuseAPI and asking for last known location so that i can suggest at least something. If I am asking user to on GPS he is uninstalling app.

I have used standard code of google to get last known location I thought it will give last known location even if user off GPS.

Lokesh Tiwari
  • 10,496
  • 3
  • 36
  • 45

1 Answers1

0

Google API let you choose location provider, GPS or Network (Access Point, if supported). The way to do this it using LocationManager.NETWORK_PROVIDER

In additional, You can check if the provider is enabled (if your AP support location) with isProvideEnabled method:

boolean isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
AsfK
  • 3,328
  • 4
  • 36
  • 73