diff --git a/README.md b/README.md index 005d5b7..c45a272 100644 --- a/README.md +++ b/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. diff --git a/plugin.xml b/plugin.xml index bce819a..06e4e9d 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - Root Detection Yury Trykov (http://trykov.ru/)