Force application to restart from first Activity (when a permission is denied)

后端 未结 5 1812
庸人自扰
庸人自扰 2021-02-02 09:46

It is known that when we deny permissions at runtime in Android 6.0 and resume the app from the recent menu, the app process

5条回答
  •  隐瞒了意图╮
    2021-02-02 10:07

    You can follow below steps for that.

    1. Create a Base Activity that extends AppcompatActivity for maintaining all permissions and check permissions onResume().
    2. Extend Base Activity from all activities.
    3. If any permission is denied, you can do whatever you want from Base Activity.

    Happy Coding! :)

提交回复
热议问题