BackgroundTaskPlugin

beforeExit

beforeExit(cb: Function): CallbackID
When the app is backgrounded, this method allows you to run a short-lived background task that will ensure that you can finish any work your app needs to do (such as finishing an upload or network request). This is especially important on iOS as any operations would normally be suspended without initiating a background task.
cb Function
the task to run when the app is backgrounded but before it is terminated
Returns: CallbackID

finish

finish(options: { taskId: CallbackID }): void
Notify the OS that the given task is finished and the OS can continue backgrounding the app.
options { taskId: CallbackID }
Returns: void

addListener

addListener(eventName: string, listenerFunc: Function): PluginListenerHandle
eventName string
listenerFunc Function
Returns: PluginListenerHandle

Interfaces Used

CallbackID

type alias CallbackID {
}