cordova-plugin-ws1intelligence

    1.0.0 • Public • Published

    cordova-plugin-ws1intelligence

    This plugin enables access to Workspace ONE Intelligence SDK features for Cordova applications for iOS and Android.

    License

    By integrating or downloading the software development kit (SDK) you accept the VMware License

    Installation

    In your application directory, simply type cordova-plugin-ws1intelligence at the command line to install the plugin.

    Initialization

    The Workspace ONE Intelligence Cordova plugin must be initialized by the host application prior to use. To do so, you must call an initialization function with your valid iOS and Android app ID.

    WS1Intelligence.init({ 'iosAppID' : 'YOUR_IOS_APP_ID_HERE', 'androidAppID' : 'YOUR_ANDROID_APP_ID_HERE'});

    This initialization call can be made in the onDeviceReady function.

    You should see subsequent messages in your application logs that confirms successful initialization.

    Support

    • iOS 12.0+ / Xcode 12.2
    • Android API 16 and above

    Functions

    The Workspace ONE Intelligence Cordova Plugin exposes the native interface of both the Android and iOS SDKs to Cordova applications through a wrapper interface.

    Functions available for Android and iOS

    init(appID)
    Initializes the Workspace ONE Intelligence SDK.
    setLoggingLevel(loggingLevel)
    Sets the logging level of debug logs for the WS1 Intelligence SDK.

    Logging Levels

    • WS1IntelligenceLoggingLevelSilent
    • WS1IntelligenceLoggingLevelError
    • WS1IntelligenceLoggingLevelWarning
    • WS1IntelligenceLoggingLevelInfo
    • WS1IntelligenceLoggingLevelDebug
    • WS1IntelligenceLoggingLevelVerbose
    leaveBreadcrumb(breadCrumb)
    Logs a breadcrumb. Parameter is a string.
    setAsyncBreadcrumbMode(asyncBreadcrumbsEnabled)
    Toggles asynchronous breadcrumb logging mode. Parameter is a boolean value. By default, breadcrumbs are flushed to disk synchronously to help ensure an accurate record prior to a potential crash. For performance reasons, an application may prefer to use asynchronous logging.
    beginUserFlow(userFlowName)
    Starts a user flow with the provided name. Parameter is a string.
    endUserFlow(userFlowName)
    Ends successfully a user flow with the provided name. Parameter is a string.
    failUserFlow(userFlowName)
    Fails a user flow with the provided name. Parameter is a string.
    cancelUserFlow(userFlowName)
    Cancels a user flow with the provided name. Parameter is a string.
    logHandledException(exception)
    Logs a handled exception. Parameter is an exception. Use this method when a Javascript exception is caught in code.
    logUnhandledException(exception)
    Logs an unhandled exception. Parameter is an exception. This method is used for exceptions that were not caught in application code.
    logNetworkRequest(method, url, responseTime, bytesRead, bytesSent, responseCode, error)
    Logs details of a network request transaction.
    logLocation(latitude, longitude)
    Logs current device location
    setOptOutStatus(status)
    Enable or disable opt out, which prevents any data from being logged.
    getOptOutStatus(callback)
    Get the current opt-out status. Status is returned via a callback provided by the caller.
    getUserUUID(callback)
    Get the Workspace ONE Intelligence UUID for the current device. UUID is returned via a callback provided by the caller.(iOS only)
    didCrashOnLastLoad(callback)
    Checks if the previous session ended in a crashed state. Crash information is returned via a callback provided by the caller.
    setUsername(username)
    Sets a username which is affiliated with all following events. Parameter is a string.

    Install

    npm i cordova-plugin-ws1intelligence

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    VMWare license

    Unpacked Size

    42.1 MB

    Total Files

    28

    Last publish

    Collaborators

    • crittercism