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?
ContextCompat.checkSelfPermission()
Thanks in advance for your help.
, , , , . , , , .
, , ContextCompat.checkSelfPermission(). , , , :
// Assume thisActivity is the current activity int permissionCheck = ContextCompat.checkSelfPermission(thisActivity, Manifest.permission.WRITE_CALENDAR);
, PackageManager.PERMISSION_GRANTED, . , PERMISSION_DENIED, .
Source: https://habr.com/ru/post/1613432/More articles:Laravel 5 Image Upload Wrong database path - phpWhy is my form not submitting to the pivot table? - phpHow to add an onClick event handler to the canvas form in Elm? - elmHow to get POST data with a swirl? - phpLaravel 4.2 Сохранение пути к базе данных - phpJavascript: undefined as function parameter - javascriptChanging html content and url without reloading the page - javascriptCreate and debug targets right away for eclipse CDT with cmake - eclipseFailed to complete the query - sqlIONIC CLI could not add Android platform - androidAll Articles