1.1.2 • Published 5 years ago
cordova-plugin-config-alert v1.1.2
ConfigAlert plugin
This Cordova plugin alerts configuration requirements of your Android app and then opens the related settings, e.g. Protected Apps in Huawei devices. The plugin is also compatible with PhoneGap Build.
Supported Platforms
- Android
Usage
Alert the 'Protected App' requirement in Huawei devices
cordova.plugins.ConfigAlert.alert();
All optional paramters with default values
cordova.plugins.ConfigAlert.alert({
title: "Huawei Protected Apps",
message: "This app requires to be enabled in 'Protected Apps' to function properly.",
ok: "Protected Apps",
cancel: "Remind",
package: "com.huawei.systemmanager",
class: "com.huawei.systemmanager.optimize.process.ProtectActivity",
force: false, // force alert, ignoring user selection and value of SharedPreference
key: "skipAlerts", // key to SharedPreference
allPowerSavers: false // alert all known power savers
});
Installation
The plugin can either be installed from git repository, from local file system through the Command-line Interface or cloud based through PhoneGap Build.
Local development environment
From master:
# ~~ from master branch ~~
cordova plugin add https://github.com/ToniKorin/cordova-plugin-config-alert.git
from a local folder:
# ~~ local folder ~~
cordova plugin add cordova-plugin-config-alert --searchpath path
or to use the latest stable version:
# ~~ stable version ~~
cordova plugin add cordova-plugin-config-alert@1.x.x
To remove the plug-in, run the following command:
cordova plugin rm cordova-plugin-config-alert
PhoneGap Build
Add the following xml line to your config.xml:
<gap:plugin platform="android" name="cordova-plugin-config-alert" version="1.x.x" source="npm"/>
History
Check the Change Log.
License
This software is released under the Apache 2.0 License.
© 2016 Toni Korin