Enable location services for Android if user chose Never option

后端 未结 4 1044
滥情空心
滥情空心 2021-02-19 18:56

Is there any way to allow location services again for an app (or at least show the dialog) if the user previously chose the option Never?

4条回答
  •  执念已碎
    2021-02-19 19:05

    Right, never means never! If the user previously answered "not now" to your app's location permission request, you can produce a dialog asking permission. But if they have selected to never let you ask again, that is set permanently and you have to tell them to delete and reinstall. (In the case that their location is temporarily turned off, but the app has permission to access their location, then a dialog can be produced asking to change the location services status for the device.) If location is a necessary component of the app, you may consider requiring access at install. In the upcoming Android M, individual permissions can be set and reset for each app, helping to avoid this sort of problem.

提交回复
热议问题