Settings.canDrawOverlays is returning false even after turning the permission on from settings
问题 I am trying billow Code from this answer to check if the permission is enabled. but it is returning false even when the permission is enabled from the settings. public static boolean canDrawOverlayViews(Context con){ if(Build.VERSION.SDK_INT< Build.VERSION_CODES.LOLLIPOP){return true;} try { return Settings.canDrawOverlays(con); } catch(NoSuchMethodError e){ return canDrawOverlaysUsingReflection(con); } } public static boolean canDrawOverlaysUsingReflection(Context context) { try {