Gamification integration Documentation - webview

1. Introduction

Document guideline for AT Gamification partner integrate Game feature to app.

2. Parameters and terminology

2.1. Root URL

https://{partner}.game.scalef.com

{partner} subdomain will be provided to partners during the integration process.

2.2. Parameters

Parameters

Description

partnerID

ID of partner in AT system

privateKey

This is the secret code for identify partner, AT Gamification will provide it within the integration process.

userId

ID of user on partners system, AT Gamification will automatically sync this information in the first call of WebView URL.

userName

Name of user on partners system, AT Gamification will automatically sync this information in the first call of WebView URL.

timestamp

Time to open URL (by seconds).

3. Integration Works

The following steps are required for integrating AT Gamification features into the partner's application, please read all these following steps carefully. If having any problems arise during the integration process (related to equipment, technology being used, ...) please contact AT gamification as soon as possible to get support.

3.1. Create access point for integrated feature

In order for users to access the game function, partners need to create an access point for the Game feature on their application and link to a function (screen) containing the WebView, called integrated URL (see section 3.3). We encourage partners to place the access point in the form of a function menu or in a location convenient for the user to access or easy to identify. Also, the access point should have a special icon to help users remember it easily.

3.2. Generate token from parameters

Token associated with the URL will be used to secure that URL with AT Gamification system, WebView will only be downloaded when the Token is correct.

Create string from parameters:

Use SHA256 to encode the string above to get the token

3.3. Create integration URL

Integrated URL is used to open and display WebView of the feature, that contains the interface users can access and use. WebView will be called according to the Root URL, that AT Gamification provided to partner (see section 1.1), following that are query parameters to identify users and contain the security token between two systems.

Structure of integrated URL

3.4. Display WebView in feature screen

After creating the integrated URL, partners' app need to use WebView to display the content when calling the URL. All user actions related to the integrated function will be displayed in the WebView, corresponding to the URL being called.

Partners should pay attention to optimize display area of WebView (over 80% of application display space for smartphone devices) and place the WebView on a separate screen (not in modal form) to achieve the best display result.

Notes

This mechanism is a must for integration or some features on the integration will not work. Read the Sample Code section below for reference.

Last updated

Was this helpful?