App
This integration is used to handle some basic calls to the app.
Introduction
This integration is used to handle some basic calls to the app.
Integration name: AppIntegration
Methods
webAppIsReady
webAppIsReady(): void
The website is expected to call this method as soon as it’s ready to handle events from the app. When this method has been called the app knows, the website has been initialized and is ready to handle events.
setAppUrl
setAppUrl(url: string): bool
Use this method to control which URL the app load when it is initialized. The method returns true
when the URL has been changed.
resetAppUrl
resetAppUrl(): void
Call this method to reset the startup URL of the app. After calling this method the app will load the URL it was “born” with after a restart. Please notice that this URL can be different between the test and production environment.
version
version(): string
Returns the version number of the app (eg. 1.0.0).
restartApp
restartApp(): void
Calling this method will reload the startup URL. Use this method if there’s not internet and the user want’s to try reloading the website again.
Events
appInForegroundEventRecievedEvent
appInForegroundEventRecievedEvent()
The event will be called whenever the app enters the foreground on the device and when the app starts og thus also enters the foreground on the device.