Skip to content

Cordova Plugin for android DrawOverApplication permission.

Notifications You must be signed in to change notification settings

basheerkohli/DrawOverApps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DrawOverApps

Cordova Plugin for android Apps that draw over the other apps permission.

To install the plugin into your application

ionic cordova plugin add https://github.com/basheerkohli/DrawOverApps.git --save

How to use:

Declare cordova variable.

declare var cordova: any;

To check if the permission is enabled

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
        //....
        }
      }
    );

To request the permission

cordova.plugins.DrawOverApps.requestPermission(
              null,
              resultCode => {
                if (resultCode == 0) {
                    // permission granted
                }
              },
              errorCode => {
                if (errorCode == -1) {
                  // permission denied
                }
              }
            );

About

Cordova Plugin for android DrawOverApplication permission.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published