Cordova Plugin for android Apps that draw over the other apps permission.
ionic cordova plugin add https://github.com/basheerkohli/DrawOverApps.git --save
Declare cordova variable.
declare var cordova: any;
cordova.plugins.DrawOverApps.checkPermission(
null,
resultCode => { // success callback
if (resultCode == 0) { // 0 - permission given.
//....
}
},
resultCode => { // failure call back
if (resultCode == -1) { //-1 need to give permission
//....
}
}
);
cordova.plugins.DrawOverApps.requestPermission(
null,
resultCode => {
if (resultCode == 0) {
// permission granted
}
},
errorCode => {
if (errorCode == -1) {
// permission denied
}
}
);