Starts a foregrounding service which increases the process prority to prevent Pega Mobile Client from being killed by the Android operating system, e.g when the user is gathering data to be entered in a form.
Once started, the foreground service can be stopped using the stopKeepAlive
method.
Under normal operating conditions, the foregrounding service starts automatically once an external activity is opened, which reduces a risk of the client being terminated. When this happens, the following notification is displayed: “Waiting for an external action to finish". After returning to the client, the service closes.
On iOS, this method has no effect.
Name | Description | Type | Use |
---|---|---|---|
message | Includes a message to be displayed in the device's notification area. | string |
required |
title | Includes a title of the message displayed in the device's notification area. If the value is not provided, the system displays the name of the app as the title. | string |
optional |
timeout | Sets a time after which the foreground service is automatically terminated (in seconds).
Calling the
|
integer |
optional |