Table of Contents

Article

Preventing Pega Mobile Client-based custom mobile apps from being closed by Android

Under certain conditions, for example, when more memory is needed, the Android operating system might terminate mobile apps that are based on Pega Mobile Client™ (PMC), which have been sent to the background. As a result, users might have to reauthenticate when they return to the application.

When you build the PMC-based mobile apps in Designer Studio, Pega Platform™ applies a feature that lowers the risk of mobile apps being closed by Android. By default, this feature is turned on, the time for which the app is protected is set to 3600 milliseconds, and the default message displayed on the device reads "App paused". You can turn this feature off or turn it on for an indefinite time. You can also modify the default message.

Do the following to configure the feature that protects your PMC-based mobile app from being terminated:

  1. In Designer Studio, navigate to the .pyKeepAliveTimeout Declare Expression rule, or use the Search field to quickly find the rule.
  2. Expand the Save as list, and select Specialize by class or ruleset.
  3. In Add to ruleset field, select the ruleset of your mobile app.
  4. Click Create and open to open the .pyKeepAliveTimeout rule that is specific to your app.
  5. Complete the condition in the declare expression by setting the value of the keep-alive timeout:
    • 0 - Turns the feature off.
    • A negative value - Turns the feature on for an indefinite period of time.
  6. Click Save.

Do the following to modify the default message that is displayed on the device when your PMC-based mobile app is sent to the background:

  1. In Designer Studio, navigate to the pyCaption App paused Field Value rule, or use the Search field to quickly find any rule.
  2. Expand the Save as list, and select Specialize by class or ruleset.
  3. Modify the value in the Label field.
  4. Select the ruleset for your mobile app.
  5. Click Save.

You have successfully modified the feature that protects your PMC-based mobile app from being terminated.

Published June 13, 2016 — Updated August 7, 2019

Related Content

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.