cordova-plugin-root-detection
v0.1.1
Published
Cordova Plugin for detecting if the device running the app is rooted.
Downloads
588
Maintainers
Readme
Root Detection Plugin for Apache Cordova
Use this plugin to check if the android device running the app is rooted.
Install
Locally
cordova plugin add https://github.com/trykovyura/cordova-plugin-root-detection.gitUsage
isDeviceRooted
rootdetection.isDeviceRooted(successCallback, errorCallback);- =>
successCallbackis called with true if the device is rooted, otherwise false - =>
errorCallbackis called if there was an error determining if the device is rooted - returns '1' if device is rooted else '0'
Example
var successCallback = function (result) {
var isDevicesRooted = result == 1;
};
var errorCallback = function (error) {
console.error(error);
};
rootdetection.isDeviceRooted(successCallback, errorCallback);Platform Support
Android only.
License
MIT License
