mirror of
https://github.com/shuto-cn/cordova-plugin-root-detection.git
synced 2026-04-19 00:01:31 +08:00
update plugin version
This commit is contained in:
@@ -16,13 +16,24 @@ cordova plugin add https://github.com/trykovyura/cordova-plugin-root-detection.g
|
|||||||
### isDeviceRooted
|
### isDeviceRooted
|
||||||
|
|
||||||
```js
|
```js
|
||||||
rootdetection.isDeviceRooted(successCallback, failureCallback);
|
rootdetection.isDeviceRooted(successCallback, errorCallback);
|
||||||
```
|
```
|
||||||
|
|
||||||
- => `successCallback` is called with true if the device is rooted, otherwise false
|
- => `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'
|
- 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
|
## Platform Support
|
||||||
|
|
||||||
Android only.
|
Android only.
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?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">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<name>Root Detection</name>
|
<name>Root Detection</name>
|
||||||
<author>Yury Trykov (http://trykov.ru/)</author>
|
<author>Yury Trykov (http://trykov.ru/)</author>
|
||||||
|
|||||||
Reference in New Issue
Block a user