Android
Quick Setup
Open
SampleApp/in Android Studio.Ensure the library exists at:
SampleApp/app/libs/UAE-PASS-Android-Library-release.aar
Verify
SampleApp/app/build.gradleincludes:implementation files('libs/UAE-PASS-Android-Library-release.aar')
Configure your values in
SampleApp/app/build.gradle:CLIENT_IDCLIENT_ID_FACE_VERFICATIONREDIRECT_URLURI_SCHEME(must be unique; do not keep the sample value)
Make sure
manifestPlaceholders.schemematchesURI_SCHEME.
#Mandatory First Flow (Do This First)
Before profile or signing actions, complete this sequence:
Select environment in the app (
STAGING,PRODUCTION).Tap Get Access Code.
Send the returned access code to your backend.
Backend exchanges code for token and returns token to app.
Paste token in the Access Token field.
Tap Submit Access Token.
Environment Mapping
The selected environment must match the UAE Pass app installed on the device:
PRODUCTION->ae.uaepass.mainappSTAGING->ae.uaepass.mainapp.stg
#Use the correct token for each operation.
1) User Access Token (Profile)
Obtained by backend after exchanging login access code.
Used for profile retrieval (
getUserProfile).
2) Signing Token (Client Credentials)
Obtained by backend using client credentials and signing scope.
Used for document signing and signed-document download.
This token is different from the profile/user token.
Get User Profile
After submitting a valid User Access Token:
Tap Get User Profile.
App calls
UAEPassController.getUserProfile(...).
Document Signing Flow
Prerequisites
Use sample PDF from assets (
dummy.pdf) or your own PDF.Ensure signing payload JSON is valid.
Ensure signing token is pasted and submitted.
Signing Steps
Paste signing token in Access Token field.
Tap Submit Access Token.
Tap one of:
Sign Document (advanced)
Sign Document (Qualified)
Complete UAE Pass authentication in app or WebView.
App receives
documentURLin callback.App downloads signed PDF via
downloadDocument(...)and saves it to Downloads.
Signing Payload Files
SampleApp/app/src/main/assets/testSignData.jsonSampleApp/app/src/main/assets/testSignDataQualified.json
Ensure finish_callback_url matches your app scheme:
For qualified signature flow, use testSignDataQualified.json.
Reset / Logout
Use the Reset button to clear local session data:
Clears stored access token (
UAEPassController.clearAccessToken())Clears WebView cookies
Clears token input and access code label in UI
Run the Sample
From project root SampleApp/:
Then install and run from Android Studio or with ADB.
Main Files to Review
SampleApp/app/src/main/java/ae/sdg/uaepasssample/MainActivity.ktSampleApp/app/src/main/java/ae/sdg/uaepasssample/UAEPassRequestModels.ktSampleApp/app/src/main/assets/testSignData.jsonSampleApp/app/src/main/assets/testSignDataQualified.jsonTECHNICAL_DOCUMENTATION.md
Note :
Submit Access Token does not call UAE Pass APIs.
It only stores the token using
UAEPassController.setAccessToken(...)for later calls.
Last updated
Was this helpful?