I am a bit puzzled over getting active system alert window permissions for a package in Android. I am using the code below, but this code returns 0 even if we disallow that app from "Draw over other app". Any Pointers?.
My use case is to have a check in place where if any app with system_alert_window permission
is found, we need to tell user to change that apps permission to proceed further.
packageManager.checkPermission("android.permission.SYSTEM_ALERT_WINDOW", info.packageName)