8min

Android App Integration

Integration

  • Add the JitPack repository to your root build.gradle file:
build.gradle
|
  • Add SDK dependency to your build.gradle file and sync project:
build.gradle
|

Set Up User Login

Please refer to Android for detailed instructions about how to set up the SDK to handle Authentication via URL Deep linking and/or a built in Scanner

Provision and retrieve API login credentials from the APEX WebSocket API (GetAPICredentials())

Keyri's session object has a "payload" field in which you can input any data, which will be encrypted all the way to the browser when the user scans the login QR code and the valid session is confirmed. You can fetch the user's API credentials from the APEX user management system at any point before this, and populate this field with the API credentials before going on to confirm the session. Please see the sample code below

Important Note: The APIKey and APISecret will be decommissioned as soon as the user is logged in on the browser.

This function can be activated once the login QR code has been scanned and parsed, either from a Universal Link (iOS) / App Link (Android) or your app's built-in QR code scanner.

Construct the function as follows:

1. Send the following message to wss://apexapi.{yourDomain}/WSGateway with the user's UserId:

JSON - Request
|

2. In return, you will receive an APIKey and APISecret as follows:

JSON - Response
|

3. Finally, the function must return values for APIKey, APISecret, and UserId. These three items will subsequently be passed into the Keyri initializeQrSession() method. Please see the Android App Integration page for details on how this function is invoked

This example uses Native Android functions to handle websockets

Kotlin
|



Updated 09 Jun 2022
Did this page help?
Yes
No