open


Purpose

This method opens a native app installed on the device, using a registered URL scheme.

Signature

open ( url, dataMap )

Parameters

Name Description Type Use
url A URL address containing a custom scheme for opening a registered native app. string required
dataMap String data in the key-value map form, passed to the target application. object optional

The dataMap object can be used to pass authentication data, for example:

{
"user": "user@company",
"pass": "password"
}

Returns

This method returns a promise object, which can be in one of the following states:

  • Resolved - Confirms that the operation has completed successfully by returning a result parameter: a boolean value that indicates if the URL address can be opened.

  • Rejected - Confirms that the operation has failed by returning the following Error object:

    {
      "message": detailed_message
    }

    Where detailed_message stands for one of the following messages from the native side:

    • Invalid argument

    • Invalid url

    • Unable to find activity for given url

    • Unable to pass data to app

    • Unable to start activity for given url

    • Unexpected error

Related topics

Public API reference
Open URL
Legal notice | Copyright © 2016 and Confidential to Pegasystems Inc. All rights reserved
PDN | Hybrid Container | Feedback
Advanced...