Cordova AppUtils Plugin for Apache Cordova >= 3.0.0
cordova plugin add https://github.com/busivid/cordova-plugin-app-utils.git
Enable / Disable the device sleep mode.
// Enable the IdleTimer
apputils.IdleTimer.enable(onSuccess, onError);
/*
onSuccess:
"OK"
onError:
{ code: 1, reason: "IdleTimer already enabled." }
*/
// Disable the IdleTimer
apputils.IdleTimer.disable(onSuccess, onError);
/*
onSuccess:
"OK"
onError:
{ code: 1, reason: "IdleTimer already disabled." }
*/
// Get the IdleTimer Status
apputils.IdleTimer.getStatus(onSuccess);
/*
onSuccess:
0 = disabled
1 = enabled
*/
Get the App Bundle Info.
apputils.BundleInfo(onSuccess);
/*
onSuccess:
{
"localeLanguage": <STRING>,
"bundleBuild": <STRING>,
"bundleVersion": <STRING>,
"bundleId": <STRING>,
"bundleDisplayName": <STRING>,
"bundleIsDebug": <STRING>
}
automatic available under "apputils.info"
*/
Android iOS
- initial version