mirror of
https://github.com/shuto-cn/cordova-plugin-root-detection.git
synced 2026-01-28 00:00:01 +08:00
update plugin version
This commit is contained in:
15
README.md
15
README.md
@@ -16,13 +16,24 @@ cordova plugin add https://github.com/trykovyura/cordova-plugin-root-detection.g
|
||||
### isDeviceRooted
|
||||
|
||||
```js
|
||||
rootdetection.isDeviceRooted(successCallback, failureCallback);
|
||||
rootdetection.isDeviceRooted(successCallback, errorCallback);
|
||||
```
|
||||
|
||||
- => `successCallback` is called with true if the device is rooted, otherwise false
|
||||
- => `failureCallback` is called if there was an error determining if the device is rooted
|
||||
- => `errorCallback` is called if there was an error determining if the device is rooted
|
||||
- returns '1' if device is rooted else '0'
|
||||
|
||||
### Example
|
||||
```js
|
||||
var successCallback = function (result) {
|
||||
var isDevicesRooted = result == 1;
|
||||
};
|
||||
var errorCallback = function (error) {
|
||||
console.error(error);
|
||||
};
|
||||
rootdetection.isDeviceRooted(successCallback, errorCallback);
|
||||
```
|
||||
|
||||
## Platform Support
|
||||
|
||||
Android only.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<plugin id="cordova-plugin-root-detection" version="0.1.0" xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
<plugin id="cordova-plugin-root-detection" version="0.1.1" xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<name>Root Detection</name>
|
||||
<author>Yury Trykov (http://trykov.ru/)</author>
|
||||
|
||||
Reference in New Issue
Block a user