READ_CALENDAR permission is added in manifest.
When is started installed and started first time it shows permission pop. User will allow all permission
But when we check with code is permission lacking (NOT_GRANTED) it comes as true even if we allowed all permission at start.
final boolean lacking = ContextCompat.checkSelfPermission(context, permission) == PackageManager.PERMISSION_DENIED;
if (lacking) {
Toast.makeText(context, "permission is not granted", Toast.LENGTH_SHORT).show()
}
When app is force stopped and restarted then it will show permission as accepted
What could be the reason for this ?
IN GRADLE :
compileSDKversion : 33
targetSDKversion :33
tried on sample app to reproduce this issue but not reproducible.
Bhargav is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.