Default permission for draw over other app - true

455 Views Asked by At

In my app I need to make default permission for draw over other app as true, like in most of the Android app.

How to do this in my app.

1

There are 1 best solutions below

2
On
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

This permission allow to draw over app

Enable it by redirecting user to setting page

if (!Settings.canDrawOverlays(this)) { Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + getPackageName())); startActivityForResult(intent, 0); }