My question is can you get location coordinates latitude and longitude using WIFI or any other source when location is off or disabled. Basically I want to get current location when the GPS is not enabled
Asked
Active
Viewed 144 times
0
-
https://developer.android.com/reference/android/location/LocationManager#NETWORK_PROVIDER – Michael Oct 19 '22 at 06:08
-
Does this answer your question? [How do I get the current GPS location programmatically in Android?](https://stackoverflow.com/questions/1513485/how-do-i-get-the-current-gps-location-programmatically-in-android) – Sam Mason Nov 16 '22 at 13:10
-
see above for getting access to coarse / network location data – Sam Mason Nov 16 '22 at 13:11
1 Answers
0
If location permission isn't granted or location settings are off, no. That's on purpose- the user doesn't want to give you their location, respect that. Now if it's just GPS but not location that's off you can use coarse location. That uses wifi only, is less accurate, but can be used with less battery drain than GPS.

Gabe Sechan
- 90,003
- 9
- 87
- 127