☰

Set Advanced Settings

An overview of the Set Advanced Settings request message for Android.

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.

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

For a typical Set Advanced Settings request, the client app must provide the following information:

Field Description Example Required Card terminal support Type
scheme The Viva's custom URL scheme, the host and the version. 'vivapayclient://pay/v1' βœ… 'Viva.com Terminal' application for Android
appId The client app ID. For successful validation, should not be empty. 'com.example.myapp' βœ… 'Viva.com Terminal' application for Android
action Set advanced settings. For successful validation, should not be empty. 'set_advanced_settings' βœ… 'Viva.com Terminal' application for Android
enableTerminalService A flag indicating whether the terminal service is enabled.
The default value is false.

⚠️This parameter has the highest hierarchy. If it is set to false, the values of keepAliveService and updateUserStatus are ignored.
true βœ… 'Viva.com Terminal' application for Android boolean
keepAliveService A flag indicating whether the keep-alive service is enabled.
The default value is true.

This parameter is applied only if enableTerminalService is true.
false 'Viva.com Terminal' application for Android boolean
updateUserStatus A flag indicating whether the update of the user status is enabled.
The default value is true.

This parameter is applied only if enableTerminalService is true.
true 'Viva.com Terminal' application for Android boolean
callback The URI callback that will handle the result. For successful validation, should not be empty. 'mycallbackscheme://result' βœ… 'Viva.com Terminal' application for Android
How the advanced parameters combine
- 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.

Field Description Example Card terminal support
callback The URI callback that will handle the result. 'mycallbackscheme://result' 'Viva.com Terminal' application for Android
status The status of the Set Advanced Settings request. 'success' 'Viva.com Terminal' application for Android
message A string containing information about the status of the request. 'Advanced settings updated' 'Viva.com Terminal' application for Android
action Set advanced settings. 'set_advanced_settings' 'Viva.com Terminal' application for Android

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. Android Card Terminals
'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. 'Viva.com Terminal' application for Android
Linux Card Terminals Countertop, IM20, S900, S800, D200. Linux Card Terminals

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!