Skip to content

Instantly share code, notes, and snippets.

@SerggioC
Created August 4, 2022 16:15
Show Gist options
  • Save SerggioC/9b2bfa0349e711f674e0d4c54ce45c3e to your computer and use it in GitHub Desktop.
Save SerggioC/9b2bfa0349e711f674e0d4c54ce45c3e to your computer and use it in GitHub Desktop.
Retrieve All Android Manifest Permissions
@JvmStatic
fun retrieveAllManifestPermissions(context: Context): Array<String> {
return try {
context
.packageManager
.getPackageInfo(context.packageName, PackageManager.GET_PERMISSIONS)
.requestedPermissions
} catch (e: Exception) {
emptyArray()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment