Set Advanced Settings
An overview of the Set Advanced Settings request message for Android.
- Overview
- Set Advanced Settings request
- Set Advanced Settings response
- Key to card terminal product categories
- Get Support
Overview
π The Set Advanced Settings request is used to configure and apply changes to the advanced settings of the ‘Viva.com Terminal’ application, i.e. the terminal service and its related options.
There are three options available under Advanced Settings, and you can update the configuration using the Inter-App request below.
- enableTerminalService: Enables the terminal background service, helping keep the Viva.com Terminal app active and avoiding a full application reload on subsequent launches. It also enables automatic diagnostic log uploads approximately every 10 minutes.
- keepAliveService: Keeps the terminal service running in the background even when the application is closed, allowing the app to resume faster without a complete reinitialization. Only applies when enableTerminalService is enabled.
- updateUserStatus: Keeps the user session current by refreshing authentication/user-status information in the background, helping maintain uninterrupted access to functionality that requires a valid session. Default:true. Only applies when enableTerminalService=true
The client app must implement a mechanism to send messages using Android intents and URI calls and to receive the result in a custom URI callback.
- Set Advanced Settings request originating from the client app to change the advanced settings.
- Set Advanced Settings response originating from the ‘Viva.com Terminal’ application to return the result of a Set Advanced Settings request.
Set Advanced Settings request
For a typical Set Advanced Settings request, the client app must provide the following information:
-
enableTerminalService has the highest hierarchy. If enableTerminalService=false, the values of keepAliveService and updateUserStatus are skipped.- Since the default value of
enableTerminalService is false, it must be explicitly set to true in order for keepAliveService and updateUserStatus to take effect.
The above information elements must create a URI call, i.e.
String reqStr = "vivapayclient://pay/v1"
ββββ+ "?appId=com.example.myapp"
ββββ+ "&action=set_advanced_settings"
ββββ+ "&enableTerminalService=true"
ββββ+ "&keepAliveService=false"
ββββ+ "&updateUserStatus=true"
ββββ+ "&callback=mycallbackscheme://result";
Intent payIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(reqStr));
payIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
payIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
startActivity(payIntent);Set Advanced Settings response
After executing the Set Advanced Settings request, the ‘Viva.com Terminal’ application responds with a response to indicate if the advanced settings have been applied successfully or not.
The result is received as a URI in the callback activity intent:
Uri result = getIntent().getData();The table below summarises the contents of an approved response.
A Set Advanced Settings response result for an approved request looks as follows:
It is expected that certain requests will fail for various reasons. A Set Advanced Settings response result for a failed request looks as follows:
Key to card terminal product categories
To understand the icons used on the above tables, see the below table.
| Product category | Terminal models | Icon |
|---|---|---|
| Android Card Terminals | Android Card Terminal Ethernet, Android Card Terminal 4G, Mobile Card Terminal Plus, Mobile Card Terminal. | ![]() |
| 'Viva.com Terminal' application for Android | Mini Card Reader, Pocket Card Terminal connected via Bluetooth or USB to the 'Viva.com Terminal' application for Android. | |
| Linux Card Terminals | Countertop, IM20, S900, S800, D200. | ![]() |
Get Support
If you would like to integrate with Viva, or if you have any queries about our products and solutions, please see our Contact & Support page to see how we can help!

