You are viewing the Resources for the older version of JourneyApps (V3). JourneyApps V4 is the new default for all new apps since July 1, 2016.

Opening External Links / Apps from JavaScript


External links can be triggered from JavaScript (which can also be used to open external apps), and some other actions can also be triggered such as making a phone call or drafting an SMS to a specified recipient.

Please Note: This functionality has been available since version 3.7.5 of the JourneyApps Container on Android. If you receive an error while trying to use this functionality, please ensure that you've upgraded to version 3.7.5 or later if you are using Android.

The following syntax should be used in a JavaScript function (that is called when a button is pressed, for example):

Opening an External App

By utilizing URL handlers that are available on a mobile device, it is possible to launch external apps.

In the following example, we open the App Store on iOS and display the JourneyApps application, using the itms:// URL handler that is available on iOS.

View XML:

View JavaScript:

Platform-Specific Links

In some cases, it may be necessary to tailor your links depending on which mobile OS the user is using (iOS or Android). For this purpose, the global journey.platform property can be used, which will have a value of either "iOS" or "Android", or "Web" (for Chrome) depending on the OS.

To make our previous example work on both Android and iOS, we would use: