I'm developing an Android app that requires the FULL_SCREEN_NOTIFICATION permission to display full-screen alarm notifications. In Android 14, this permission has become a runtime permission, so I've implemented the necessary logic to request and handle this permission.
However, I've encountered an issue where the FULL_SCREEN_NOTIFICATION permission is automatically revoked when I grant or deny other permissions, such as SYSTEM_ALERT_WINDOW (display over apps) or REQUEST_IGNORE_BATTERY_OPTIMIZATIONS (battery saver). This behavior is observed on some devices like Xiaomi 12lite running Android 14(HyperOs), but not on others(Samsung a34).
Steps to Reproduce:
- Install the app on an Android 14 device.
- Grant the
FULL_SCREEN_NOTIFICATIONpermission when prompted. - Request and grant (or deny) another permission, such as
SYSTEM_ALERT_WINDOWorREQUEST_IGNORE_BATTERY_OPTIMIZATIONS. - Check the permission status for
FULL_SCREEN_NOTIFICATION. It will be revoked.
Expected Behavior:
Granting or denying other permissions should not affect the FULL_SCREEN_NOTIFICATION permission status, as they are separate runtime permissions.
Actual Behavior:
The FULL_SCREEN_NOTIFICATION permission is revoked when granting or denying other permissions on some Android 14 devices.
Environment:
- Android version: 14
- Affected devices: Xiaomi 12 lite, Xiaomi F4 GT
- App target SDK version: 34
Additional Information:
- I've tested this on other Android 14 devices, and the issue does not occur.
- I've checked the device manufacturer's documentation and support resources, but couldn't find any relevant information.
- I've ensured that my app's permission handling logic is not inadvertently revoking or resetting permissions.
Has anyone else encountered this issue with the FULL_SCREEN_NOTIFICATION permission being revoked when granting or denying other permissions in Android 14? If so, what could be the potential cause, and what workarounds or solutions have you found?
Any insights or suggestions would be greatly appreciated. Please let me know if you need any additional information or code snippets to better understand the issue.