Marshmallow app recall notice?

In Android 6.0 (Marshmallow), users can revoke certain application permissions, even after granting them from within the application. I know that I can check permissions with ContextCompat.checkSelfPermission(). But is there a way for my application to receive a notification when a user revokes one of my permissions on the application, without re-checking with ContextCompat.checkSelfPermission()? Maybe a broadcast / intention or something like that?

Thanks in advance for your help.

+4
source share
1 answer

, , , , . , , , .

, , ContextCompat.checkSelfPermission(). , , , :

// Assume thisActivity is the current activity
int permissionCheck = ContextCompat.checkSelfPermission(thisActivity,
        Manifest.permission.WRITE_CALENDAR);

, PackageManager.PERMISSION_GRANTED, . , PERMISSION_DENIED, .

+1

Source: https://habr.com/ru/post/1613432/


All Articles