Skip to content

React on Tabris.js app launch and read launch parameters.

Notifications You must be signed in to change notification settings

eclipsesource/tabris-plugin-launchmonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');

About

React on Tabris.js app launch and read launch parameters.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •