langxiankui dbfeeb2e07 Update RootDetection.java
添加识别模拟器的方法,目前仅能识别Android SDK的模拟器
2018-11-14 13:45:58 +08:00
2018-11-14 13:45:58 +08:00
2018-11-14 13:44:19 +08:00
2015-06-10 21:35:55 +03:00
2015-08-04 22:41:22 +04:00
2015-08-04 22:37:27 +04:00
2017-07-25 21:42:01 +03:00

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 cordova-plugin-root-detection

or

cordova plugin add https://github.com/trykovyura/cordova-plugin-root-detection.git

Usage

isDeviceRooted

rootdetection.isDeviceRooted(successCallback, errorCallback);
  • => successCallback is called with true if the device is rooted, otherwise false
  • => errorCallback is 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

Description
Cordova plugin root detection for android devices
Readme MIT 38 KiB
Languages
Java 91.3%
JavaScript 8.7%