Android SDK
This SDK allows you to integrate Reclaim's in-app verification process into your Android application.
Prerequisites
- An Android application source code (Support for Android 5.0 or later).
- An Android device or emulator running Android 5.0 or later.
- A Reclaim account where you've created an app and have the app id, app secret.
- A provider id that you've added to your app in Reclaim Devtools.
Example
- See the Reclaim Compose Example - Android for a complete example of how to use the SDK in an Android application.
Installation
Add the following repositories to your settings.gradle
file's repositories block or at the end of settings.gradle:
Some projects may require you to add the repositories to the root build.gradle
file or your app-level build.gradle
file's allprojects section.
Next, add the following to your app level build.gradle
file:
Add the following to your app level AndroidManifest.xml
file under the <application>
tag:
Usage
To use ReclaimInAppSdk in your project, follow these steps:
- Import the ReclaimInAppSdk module into your Kotlin/Java file.
- Create a request object.
Or if you have added the APP_ID and APP_SECRET metadata to your AndroidManifest.xml file, you can create the request object using the ReclaimVerification.Request.fromManifestMetaData
method.
- Start the verification flow.
The returned result ReclaimVerification.ResultHandler.onResponse
in is a ReclaimVerification.Response
object. This object contains a response that has proofs, exception, and the sessionId if the verification is successful.
If the verification is cancelled or failed, the handler's ReclaimVerification.ResultHandler.onException
method is called with a ReclaimVerification.ReclaimVerificationException
object.
For a complete example, see the Reclaim Compose Example - Android.