canOpen


Purpose

This method verifies whether a given URL scheme can be opened in any native app installed on the device.

Signature

canOpen ( url )

Parameter

Name Description Type Use
url A URL address containing a custom scheme for opening a registered native app. string required

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 © 2017 and Confidential to Pegasystems Inc. All rights reserved
PDN | Pega Mobile Client | Feedback
Advanced...