0

In fused location provider, is there any way to detect when user has turned on or off device location?

I need to get notified in the background service of my app. The service is always running and should come to know when user turns on or off device location.

There is onLocationChanged callback but it never gets called in this case.

Update: After going through comments I checked this answer however it only tells in change in location provider. And not if location has been turned on or off.

Thank you.

Atul
  • 3,778
  • 5
  • 47
  • 87
  • 1
    did you try [**`this`**](https://stackoverflow.com/a/20673766/8867002) – Jyoti JK May 14 '18 at 08:29
  • Check this link [Click Here](https://stackoverflow.com/questions/48017537/how-to-know-in-android-if-location-is-turned-off-by-user?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa) – Umer Zaman May 14 '18 at 08:29
  • Possible duplicate of [How to trigger broadcast receiver when gps is turn on/off?](https://stackoverflow.com/questions/20673620/how-to-trigger-broadcast-receiver-when-gps-is-turn-on-off) – ישו אוהב אותך May 14 '18 at 09:37
  • Thanks everyone for comments. But as I could verify the [answer](https://stackoverflow.com/a/20673766/1911652) there doesn't tell if Location mode is on/off. – Atul May 14 '18 at 10:13

0 Answers0