I\'ve made an android application and used AlarmManager and Broadcast Receiver to get local notifications. But my Receiver class is not at all being called. I backtraced th
The permission you have declared in your Manifest is not the correct value for the permission, actual value for the permission is this:
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
See this, There is no such permission existing that is the reason it is denying the permission as well as not requesting it too, change the permission to the above value and everything will work fine.
Also if you want to verify that then:
if(ContextCompat.checkSelfPermission(this, Manifest.permission.SET_ALARM)!= PackageManager.PERMISSION_GRANTED){
Log.d("Perm check:SET_ALARM", "Permission Denied");
requestPermissions(new String[]{Manifest.permission.SET_ALARM},1);
}else{
Log.d("Perm check:SET_ALARM", "Permission Exists");
}
If you would inspect the value of Manifest.permission.SET_ALARM
, you will see that it will be "com.android.alarm.permission.SET_ALARM"
, here see this: