There are some devices where the “Display over other apps” feature may not be available. My app should restrict user access to certain functionalities if they don’t grant this permission. However, if a device doesn’t support this feature, I want to allow the user to use all of the app’s functionalities.
Is there any way to determine with 100% certainty if a device doesn’t support screen overlay?
Usually, Android Go devices don’t support this feature. I found a solution that suggests checking if the device is low on RAM, as follows:
val hasScreenOverlayFeature = !activityManager.isLowRamDevice()
However, at least one device (Xiaomi Redmi A3, model 23129RN51X) that is not running Android Go has the “Display over other apps” feature disabled (Screenshot).
Vladislav Danshov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.