-1

I want to get all the permissions for my app which are switched off by the user. In short I want the permission status for my app. How can I do that programmatically?

3 Answers3

0

Take a good look at the PackageManager especially PackageManager#GET_PERMISSIONS

getPackageManager()
    .getPackageInfo(context.getPackageName(),PackageManager.GET_PERMISSIONS)
    .requestedPermissions;

The above statement should return the requested permissions in your manifest, if there is any.

Olayinka
  • 2,813
  • 2
  • 25
  • 43
0

You can use checkSelfPermission(Context context, String permission) method of ContextCompact. check out here https://developer.android.com/reference/android/support/v4/content/ContextCompat.html

0

You can get all installed applications permissions like this.

  • Get all installed applications
  • Iterate over the applications
  • Get each application permissions list
  • Iterate over the each permission

for sample code you can visit link given below.

Referred from : How to get installed applications permissions

Rahul Soni
  • 36
  • 2
  • 10