Skip to content

Commit ba3ed21

Browse files
author
madhavanmalolan
committed
merging inapp sdk updates
1 parent df22b01 commit ba3ed21

File tree

22 files changed

+1209
-4493
lines changed

22 files changed

+1209
-4493
lines changed

content/docs/android-kotlin/installation.mdx

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,32 @@ Setup your project using the [Get API Key guide](/api-key).
1212

1313
## Installation
1414

15+
### Add Repositories
1516
Add the following repositories to your `settings.gradle` file's repositories block or at the end of settings.gradle:
1617

1718
```groovy
1819
dependencyResolutionManagement {
1920
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
2021
String flutterStorageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
21-
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/0.3.0/repo"
22+
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/repo"
2223
repositories {
2324
google()
2425
mavenCentral()
25-
maven {
26-
url "$reclaimStorageUrl"
27-
}
28-
maven {
29-
url "$flutterStorageUrl/download.flutter.io"
30-
}
26+
maven { url "$reclaimStorageUrl" }
27+
maven { url "$flutterStorageUrl/download.flutter.io" }
3128
}
3229
}
3330
```
3431

35-
You can replace the version mentioned in the url of `reclaimStorageUrl` with the version of SDK you're using. Latest is `0.3.0`.
36-
3732
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.
3833

3934
Next, add the following to your app level `build.gradle` file:
4035

4136
```groovy
42-
implementation "org.reclaimprotocol:inapp_sdk:0.3.0"
37+
implementation "org.reclaimprotocol:inapp_sdk:0.21.0"
4338
```
4439

40+
### Configure AndroidManifest.xml
4541
Add the following to your app level `AndroidManifest.xml` file under the `<application>` tag:
4642

4743
```xml
@@ -58,3 +54,22 @@ Add the following to your app level `AndroidManifest.xml` file under the `<appli
5854
android:value="<YOUR_RECLAIM_APP_SECRET>" />
5955
```
6056

57+
### Add Permissions
58+
59+
Required permission in `AndroidManifest.xml`:
60+
61+
```xml
62+
<uses-permission android:name="android.permission.INTERNET" />
63+
```
64+
65+
Optional permissions (requested by specific providers at runtime):
66+
67+
```xml
68+
<uses-feature android:name="android.hardware.camera" android:required="false" />
69+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
70+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
71+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
72+
<uses-permission android:name="android.permission.CAMERA"/>
73+
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
74+
```
75+

content/docs/android-kotlin/usage.mdx

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ import org.reclaimprotocol.inapp_sdk.ReclaimVerification
1313

1414
## Create a request object
1515

16+
Using credentials from AndroidManifest.xml:
1617
```kotlin
1718
val request = ReclaimVerification.Request(
18-
appId = "YOUR_APP_ID",
19-
secret = "YOUR_APP_SECRET",
20-
providerId = "YOUR_PROVIDER_ID"
21-
)
19+
appId = "YOUR_APP_ID",
20+
secret = "YOUR_APP_SECRET",
21+
providerId = "YOUR_PROVIDER_ID"
22+
)
2223
```
24+
2325
- You can get the `APP_ID` and `APP_SECRET` using [this guide](/api-key)
2426
- The `PROVIDER_ID` is the proof you want the user to generate. You can see all the [available providers here](https://dev.reclaimprotocol.org/explore).
2527

@@ -42,3 +44,47 @@ ReclaimVerification.startVerification(
4244
}
4345
)
4446
```
47+
48+
## Example
49+
50+
[Complete Android example](https://github.com/reclaimprotocol/reclaim-inapp-android-sdk/tree/main/example) with Jetpack Compose
51+
52+
# Advanced Options
53+
## Complete Request Parameters
54+
55+
```kotlin
56+
val request = ReclaimVerification.Request(
57+
// Required
58+
appId = "YOUR_APP_ID",
59+
secret = "YOUR_APP_SECRET",
60+
providerId = "YOUR_PROVIDER_ID",
61+
62+
// Optional
63+
session = ReclaimVerification.ReclaimSessionInformation(
64+
sessionId = "session-id",
65+
timestamp = "1234567890",
66+
signature = "signature"
67+
),
68+
69+
contextString = "additional-context", // Additional context data
70+
71+
parameters = mapOf( // Custom provider parameters
72+
"customParam" to "value"
73+
),
74+
75+
providerVersion = ReclaimVerification.Request // Specify provider version
76+
.ProviderVersion.resolved("1.0.0")
77+
)
78+
```
79+
80+
## Troubleshooting
81+
82+
### Cronet Errors (Devices without Google Play Services)
83+
84+
If you see Cronet-related errors on devices without Play Services, add embedded Cronet:
85+
86+
```gradle
87+
dependencies {
88+
implementation("org.chromium.net:cronet-embedded:141.7340.3")
89+
}
90+
```

content/docs/api-key.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,13 @@ After adding the providers, you should copy the `provider ID` and keep them hand
2828

2929
## 3. Integrate your SDK
3030
Now, you can head over to the integration guide for your platform - where you can paste these values to get the application up and running!
31+
32+
# Video Tutorial
33+
Below is a comprehensive guide on how to use the Reclaim Protocol Dev Tool
34+
<iframe
35+
className="w-full aspect-video rounded-lg"
36+
src="https://www.youtube.com/embed/wvcZPSiqn5Y?si=GyVlIfyfwmkEZlVO"
37+
title="DevTool Tutorial"
38+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
39+
allowFullScreen
40+
/>

0 commit comments

Comments
 (0)