Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.44 KB

README.md

File metadata and controls

61 lines (40 loc) · 1.44 KB

Tabris.js Launch Monitor Plugin

React on Tabris.js app launch and read launch parameters. Currently only launch by URL is supported.

Can be used in conjunction with the cordova-plugin-customurlscheme plugin and app.launch(url).

Supported platforms

Android, iOS

API documentation

eslaunchmonitor

Events

urlLaunch
  • The urlLaunch event is fired when the app has been launched through a URL.
Event Parameters:
  • target : eslaunchmonitor
  • url: string
    • The URL the app was launched through.
  • queryParameters: {[key: string]: any}
    • Query parameters, parsed from the URL.

Properties

urlLaunchParameters : {url: string, queryParameters: {[key: string]: any}}

The most recently used parameters to launch the app by URL. Particularly useful when the urlLaunch event listener cannot be registered early enough to handle the first triggered event.

Usage

App 1:

config.xml

<plugin name="cordova-plugin-customurlscheme" spec="4.3.0">
  <variable name="URL_SCHEME" value="testapp" />
</plugin>

JS

eslaunchmonitor.on({urlLaunch: ({url, queryParameters}) => {
  console.log(url); // testapp://?foo=bar
  console.log(queryParameters); // {foo: 'bar'}
}})

App 2:

JS

import {app} from 'tabris';

app.launch('testapp://?foo=bar');