-
Notifications
You must be signed in to change notification settings - Fork 11
docs: update android sdk docs to the latest #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
WalkthroughTwo Android-Kotlin documentation files updated to reflect SDK version changes (0.3.0 to 0.21.0) and new API patterns. The installation guide is reorganized with clearer prerequisites, simplified Maven repository configuration, and comprehensive permission guidance. The usage guide introduces manifest metadata-based request creation, revised error handling with distinct exception types, and extended constructor parameters supporting session information and provider versioning. Changes
Sequence Diagram(s)sequenceDiagram
participant App as App
participant SDK as Reclaim SDK
participant Handler as ResultHandler
rect rgb(200, 220, 255)
Note over App,Handler: Request Creation
App->>SDK: fromManifestMetaData(context, providerId)
SDK-->>App: ReclaimVerification.Request
alt Alternative: Direct Construction
App->>SDK: ReclaimVerification.Request(appId, secret, providerId,<br/>session?, contextString?, parameters?, providerVersion?)
SDK-->>App: Request instance
end
end
rect rgb(220, 255, 240)
Note over App,Handler: Verification Flow
App->>SDK: startVerification(request)
SDK->>SDK: Generate ZK proof & verify in-app
alt Success Path
SDK->>Handler: onResponse(successful response)
Handler-->>App: Handle success
else Error Paths
SDK->>Handler: onException(Failed/Cancelled/<br/>Dismissed/SessionExpired)
Handler-->>App: Handle specific exception type
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
content/docs/android-kotlin/installation.mdx (1)
68-85: Permissions section is comprehensive.Clear distinction between required (INTERNET) and optional permissions. The optional permissions list covers camera, location, audio, and battery optimization scenarios that providers may request at runtime. Consider adding a brief note explaining why these permissions might be needed (e.g., "optional permissions may be requested by specific providers").
content/docs/android-kotlin/usage.mdx (1)
63-88: Complete Request Parameters section documents optional fields clearly.The optional fields (session with sessionId/timestamp/signature, contextString, parameters, providerVersion) are well-documented. Each field includes a brief explanation. However, the
providerVersionexample uses a chained method call (ReclaimVerification.Request.ProviderVersion.resolved("1.0.0")) that may be unclear. Consider adding a comment or brief explanation of what provider version selection does.Example improvement (for reference):
providerVersion = ReclaimVerification.Request .ProviderVersion.resolved("1.0.0") // Specify SDK provider version (optional)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/docs/android-kotlin/installation.mdx(1 hunks)content/docs/android-kotlin/usage.mdx(1 hunks)
🔇 Additional comments (9)
content/docs/android-kotlin/installation.mdx (4)
15-16: Prerequisites are clear and directly link to dependency requirements.The prerequisites now explicitly mention the Reclaim account requirement with a link to the API key guide, which is helpful. The Android 5.0+ (API level 21) minimum is appropriate.
24-40: Verify the repository URL serves SDK version 0.21.0.The repository URL changed from a versioned path (
/android/0.3.0/repo) to a version-agnostic path (/android/repo). While this is good for future-proofing, confirm that this repository correctly serves version 0.21.0 (and will continue to serve future versions appropriately).
42-48: Dependency version updated correctly.Version bump from 0.3.0 to 0.21.0 is reflected properly. Verify this version exists on Maven Central (or the configured custom repository).
50-66: AndroidManifest configuration is clear.The reorganization places the android:windowSoftInputMode inside the activity tag and updates placeholders to more explicit values (YOUR_RECLAIM_APP_ID, YOUR_RECLAIM_APP_SECRET). This is clearer than the previous APP_ID/APP_SECRET notation and makes it obvious these are templates to be replaced.
content/docs/android-kotlin/usage.mdx (5)
3-3: Description provides helpful context.The updated description ("ZK proof generation with in-app web verification") is more specific than the installation.mdx description. Both files complement each other well—installation focuses on setup, usage focuses on functionality.
8-12: Import section is a helpful addition.The new dedicated import section improves clarity for developers unfamiliar with the SDK. Good practice to show this upfront.
14-33: Two request creation methods cover common use cases well.The
fromManifestMetaData(context, providerId)factory method reduces boilerplate by extracting app ID and secret from AndroidManifest.xml metadata (set per the installation guide), while the direct constructor offers flexibility. The method names and parameter labels are clear.
35-61: Error handling with specific exception types is more useful than generic exceptions.The updated handler distinguishes between Failed, Cancelled, Dismissed, and SessionExpired, enabling better error recovery logic. Log levels (error for Failed, debug for others) are appropriate. This is a clear improvement over the previous generic onException pattern.
90-100: Troubleshooting section addresses a real-world issue.Cronet guidance for devices without Google Play Services is practical. However, verify that the Cronet version
141.7340.3is current and matches SDK compatibility requirements.
Description
Testing (ignore for documentation update)
Type of change
Checklist:
Additional Notes:
Summary by CodeRabbit