ahmeds-airwatch-sdk-plugin v1.0.7
airwatch-sdk-plugin
This plugin provides Cordova access to features of the AirWatch mobile device management SDK for iOS and Android.
Installation
Installation of the plugin is straightforward; simply type cordova plugin add airwatch-sdk-plugin
at the command line.
Initialization
The plugin will auto-start on both Android and iOS devices, and will automatically start the AirWatch SDK. After startup, the functions will be available in the plugins.airwatch
property of the window
object. No other initialization is required to use the functions documented below.
To receive events from the SDK, an event listener must be initialized. See "Events" below.
Functions
Functions available for Android and iOS
Functions available for iOS only
Events
The AirWatch SDK sends event notifications to applications that use it when certain conditions arise. To receive these notifications in a Cordova app, the developer must first call setSDKEventListener(listener)
, where listener
is a function that accepts two parameters. The first parameter will be a string containing the name of the event, as listed below. The second will be an Object that will contain additional data if relevant to that type of event.
Events available for Android and iOS
Events available for iOS only
Network status values for stopNetworkActivity
:
Status code | Network state |
---|---|
-2 | initializing |
-1 | normal |
0 | bad SSID |
1 | cellular data disabled |
2 | roaming |
3 | proxy failed |
4 | network not reachable |
7 years ago