0

I have below codes to request new location:

 mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocationListener);

and get call back in public void onLocationChanged(Location location) .

This works fine on android P or below, but I found the callback method onLocationChanged not called on android Q, although I already have the right permissions.

tainy
  • 951
  • 7
  • 19
  • I'd have a look at [what's new in Android Q regarding privacy and location](https://developer.android.com/preview/privacy/device-location), but haven't actually gone through that documentation myself yet, so I don't have any specific ideas. Unless if you are trying to receive location in the background. – Markus Kauppinen Sep 03 '19 at 11:27
  • please read this https://developer.android.com/preview/privacy/device-location 1. – Raju Tukadiya Sep 03 '19 at 11:44
  • @RajuTukadiya why should I need this? I just want to get latest location in foreground, not background – tainy Sep 03 '19 at 11:49
  • i have one class of locations. – Raju Tukadiya Sep 03 '19 at 11:52
  • https://stackoverflow.com/questions/17591147/how-to-get-current-location-in-android please check this . location not getting then contact my email address rajutukadiya3@gmail.com – Raju Tukadiya Sep 03 '19 at 11:53
  • @RajuTukadiya no this is not the answer. My codes runs well for years. I just want to know why the callback is not called on android Q – tainy Sep 04 '19 at 02:35
  • @tainy did you get the solution?? – Chandana_Raj Jul 16 '21 at 19:35

0 Answers0