How to check permission in fragment

前端 未结 9 1963
执念已碎
执念已碎 2020-12-01 03:49

I want to check a permission inside a fragment.

my code:

        // Here, thisActivity is the current activity
        if (ContextCompat.checkSelfPe         


        
9条回答
  •  佛祖请我去吃肉
    2020-12-01 04:27

    If you closed your permission of app from settings , you can not open your permission from code or your android version lower than Marshmallow.

    You can check this documentation https://developer.android.com/training/permissions/requesting.html And this is a example https://www.learn2crack.com/2015/10/android-marshmallow-permissions.html

提交回复
热议问题