Is there anyway to get the list of supported permission of your device/version? Or to check if the permission is supported by the device. I found a code but I think it only compare it on the app permission.
PackageManager pm = this.getPackageManager();
int hasPerm = pm.checkPermission(
android.Manifest.permission.WRITE_EXTERNAL_STORAGE,
this.getPackageName());
if (hasPerm != PackageManager.PERMISSION_GRANTED) {
// do stuff
Toast.makeText(this, "Not Supported", Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(this, "Supported", Toast.LENGTH_SHORT).show();
}
do anyone know to to check the permission if its supported by the device not only the application.
any thoughts will be highly appreciated.