Android SDK configuration
Passage app configuration
Add native app
Native mobile apps require additional configuration in the Passage Console (opens in a new tab).
Navigate to Native Apps, then select Add native app. Choose Android, then follow the onscreen instructions to configure your app.
Download & publish assets
After you create your native app, you can download the assetlinks.json
file from the app menu. Publish the file to your site's .well-known/
directory.
![Native app menu](/_next/image?url=%2Fimages%2Fdownload-config.png&w=3840&q=75)
Install
In your app-level build.gradle
file, add the PassageFlex dependency.
<project>/<app-module>/build.gradle
dependencies {
// ...
implementation 'id.passage.android:passageflex:0.1.0'
}
In your app’s strings.xml
file, copy and paste the following, replacing YOUR_APP_ID
and YOUR_AUTH_ORIGIN
:
res/values/strings.xml
<resources>
//..
<!-- Required Passage app settings -->
<string name="passage_app_id">YOUR_APP_ID</string>
<string name="passage_auth_origin">YOUR_AUTH_ORIGIN</string>
<string name="asset_statements">
[{
\\"include\\": \\"https://@string/passage_auth_origin/.well-known/assetlinks.json\\"
}]
</string>
</resources>
Finally, paste the following meta-data
into your app’s AndroidManifest.xml
:
AndroidManifest.xml
<manifest ...>
<application ...>
<meta-data
android:name="asset_statements"
android:resource="@string/asset_statements" />
</application>
</manifest>