Android communities SDK
Prerequisites
Before integrating the SDK, ensure your development environment meets the following requirements:
- Android minimum API Level:
26(Android 8.0) - Android Studio: Ladybug or later
- Kotlin version:
2.1+ - Chrome must be installed on the target device (required for Chrome Custom Tab)
Adding the SDK to your project
Required app integration steps
In your app’s AndroidManifest.xml, register IDmeRedirectActivity with an intent-filter matching your redirect URI scheme. This Activity captures the OAuth callback from the Chrome Custom Tab after verification completes.
Replace yourapp with your app’s registered redirect scheme. The redirectURI you pass to IDmeConfiguration must match this exactly (e.g. yourapp://idme/callback).
Initialization
Create an IDmeConfiguration with your client credentials and desired auth settings, then instantiate IDmeAuth:
Configuration reference
Auth modes
Available scopes
Common usage patterns
Starting the verification flow
Call login() from a coroutine, passing the current Activity. This opens a Chrome Custom Tab for the user to verify their community membership. The tab dismisses automatically when verification completes.
Retrieving community attributes (OAuth / PKCE)
Retrieving user info (OIDC)
Token management
The SDK stores credentials in EncryptedSharedPreferences and handles token refresh automatically:
Fetching available policies
Discover which verification policies your organization supports:
Logout
Clears all stored credentials and tokens from encrypted storage.
Error handling
All errors are thrown as IDmeAuthError, a sealed class: