-
- All Implemented Interfaces:
public final class Inquiry
Start a Persona Inquiry flow and parse the response from your Activity.
val getInquiryResult = registerForActivityResult(Inquiry.Contract()) { result -> when (result) { is InquiryResponse.Complete -> { // ... completed flow } is InquiryResponse.Cancel -> { // ... abandoned flow } is InquiryResponse.Error -> { // ... something went wrong } } }
// Get the template ID from the Dashboard // https://withpersona.com/dashboard/integration val TEMPLATE_ID = "YOUR_TEMPLATE_ID" // ... val inquiry = Inquiry.fromTemplate(TEMPLATE_ID) .environment(Environment.SANDBOX) .build() // ... getInquiryResult.launch(inquiry)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
Inquiry.Contract
Contract to initiate and get the result from an Inquiry flow by using registerForActivityResult.
val getInquiryResult = registerForActivityResult(Inquiry.Contract()) { result -> when(result) { is InquiryResponse.Complete -> {} is InquiryResponse.Cancel -> {} is InquiryResponse.Error -> {} } }
public class
Inquiry.Companion
-
Method Summary
-
-
Method Detail
-
start
@MainThread()@Deprecated(message = "Use registerForActivityResult with the Inquiry.Contract instead.") final Unit start(Activity activity, Integer requestCode)
Launch the Persona Inquiry.
- Parameters:
activity
- current Activity that will get the responserequestCode
- arbitrary number that will be returned to you in the response
-
-
-
-