https://github.com/eclipsesource/tabris-plugin-launchmonitor
React on Tabris.js app launch and read launch parameters.
https://github.com/eclipsesource/tabris-plugin-launchmonitor
Last synced: over 1 year ago
JSON representation
React on Tabris.js app launch and read launch parameters.
- Host: GitHub
- URL: https://github.com/eclipsesource/tabris-plugin-launchmonitor
- Owner: eclipsesource
- Created: 2018-10-28T12:55:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-22T17:51:48.000Z (over 1 year ago)
- Last Synced: 2025-01-22T18:37:11.310Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 166 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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`](https://github.com/EddyVerbruggen/Custom-URL-scheme) plugin and [`app.launch(url)`](http://docs.tabris.com/latest/api/app.html#launchurl).
## 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**
```xml
```
**JS**
```js
eslaunchmonitor.on({urlLaunch: ({url, queryParameters}) => {
console.log(url); // testapp://?foo=bar
console.log(queryParameters); // {foo: 'bar'}
}})
```
### App 2:
**JS**
```js
import {app} from 'tabris';
app.launch('testapp://?foo=bar');
```