Appbit API
chevron down
 

Appbit API

Variable: me

Type: Appbit

The Appbit API provides properties and methods which relate directly to the application running on the device.

import { me } from "appbit";

console.log("Application ID: " + me.applicationId);
console.log("Build ID: " + me.buildId);

Interface: Appbit

The Appbit API provides properties and methods which relate directly to the application running on the device.

Properties

appTimeoutEnabled

boolean

New in SDK 2.0

Whether the app should time out after a period of inactivity. The default is true after an application is launched.

The value true means that the application will be killed after 2 minutes of inactivity, and false means that the application will not be killed due to inactivity, and may run indefinitely.

NOTE: the duration of the timeout is managed by the system and is not configurable using this API.

readonly applicationId

string

Application identifier under which the current application is running.

readonly buildId

string

Application build identifier under which the current application is running.

readonly launchArguments

any

New in SDK 3.0

Launch arguments passed to the app when launched.

onunload

((this: Appbit, event: Event) => any) or undefined

Event listener for the unload event. The app will unload after all event listeners have been executed.

Blocking the execution for too long will result in sudden termination of the application. Behavior of asynchronous API calls from the listener is undefined.

readonly permissions

Permissions

Permissions that have been granted or denied to the application.

Methods

exit()

Returns: void

Request to exit the application. This is an asynchronous request to exit.

The application will be unloaded after the current event loop iteration finishes. The unload event will be emitted before the application is unloaded.