How to change denied/granted permission in Android M?

前端 未结 4 1627
清酒与你
清酒与你 2021-01-22 02:12

How can I give the user a chance to change his permissions in the App, which he has already set to granted/denied?

Let\'s say a user denied a permission. Later he want\

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-22 02:54

    There are multiple ways to achieve what you are looking for:

    1. You can create a separate View/Fragment just for this purpose enlisting all of the permissions that your app requires, from there you can call requestPermission().

    2. Or you can simply prompt user for permission whenever user opens the segment of the app that requires permission to run by calling requestPermission().

    3. User can also grant permission to the app from Settings. So It might be a good idea to direct user (via a dialog for instance) to change permission at a later time if he so wishes from Settings.

提交回复
热议问题