Android SDK v1 Integration Guide
Looking for v2?
If your Template starts with tmpl_
, you’re on v1.
We will stop making updates to v1 on December 31, 2022. You will still be able to create inquiries, but no new features or fixes will be available. We recommend moving to v2 for access to the latest product improvements- please see migration to v2 section or contact us.
If you want to dive right in to the Javadocs, you can do so here.
The Persona Inquiry flow lets you securely and seamlessly collect your user’s information.
Integration
Integrate the Persona Inquiry flow directly into your Android app with our native SDK.
Requirements - Make sure the SDK is compatible
Your application needs to have a minSdkVersion set to API 21 (Lollipop, 5.0) or higher.
Dependencies - Adding Persona to your project
In your app/build.gradle
file (or wherever you plan on using the SDK) include the following:
Usage
Launching the Inquiry flow
The Inquiry
flow is initiated with a builder pattern based on either template or inquiry. Everything on the builder is optional: theme
, referenceId
, accountId
, and environment
(which defaults to PRODUCTION
).
Kotlin
Java
Receiving the response
Kotlin
Java
Customization
Make the Persona Inquiry flow look and feel like your app.
Theming
Set your own colors, buttons, fonts, and more. First, make a style in your styles.xml
file that extends the Persona style.
The following example would generate R.style.BlueDemoTheme
.
Then set in as the theme in Inquiry
builder.
Customizable attributes include colors, fonts, text alignments, images, and animations.
Customizing Fonts
In order to specify fonts on Android, the fonts either must be system fonts or fonts bundled into your application.
Providing a custom font
If you would like to provide your own custom font, first create a font resource by following the follow guide: https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.
Then you can supply your custom font in styles.xml
:
Replacing Strings
Replace any title, body, or button text by overwriting our strings in your strings.xml
file.
Available String Keys
- persona_contact_support_body
- persona_contact_support_button
- persona_contact_support_title
- persona_countryselect_body
- persona_countryselect_button
- persona_countryselect_title
- persona_governmentid_failed_title
- persona_governmentid_start_body
- persona_governmentid_start_title
- persona_governmentid_submitting_body
- persona_governmentid_submitting_title
- persona_inquiry_complete_body
- persona_inquiry_complete_button
- persona_inquiry_complete_title
- persona_inquiry_failed_body
- persona_inquiry_failed_button
- persona_inquiry_failed_title
- persona_inquiry_start_body
- persona_inquiry_start_button
- persona_inquiry_start_title
- persona_selfie_failed_body
- persona_selfie_failed_button
- persona_selfie_failed_title
- persona_selfie_start_body
- persona_selfie_start_button
- persona_selfie_start_title
- persona_selfie_submitting_body
- persona_selfie_submitting_title
- persona_database_start_body
- persona_database_start_button
- persona_database_start_title