Initializing IdvService
creates an IdvService
object containing the user ID information. This object is then used in subsequent requests and messages sent to the ID Verification service. See the flow diagram in Flows for more information.
You’ll need to initialize IdvService using the 12-digit code, the QR code, or a retained configuration.
Push Notification Token: Check Configure Android push messaging to setup push notifications using FCM. This depends upon your setting for Configure push notifications in Installation and configuration.
PingOne application Id: This is the Client ID for your application on the PingOne Console. To retrieve this value, sign on to the PingOne for Customers admin console, and go to Connections → Applications →
When ID verification is enabled for a user, the user initially will be presented with a 12-digit code and the URL for a QR code. You can initialize an IdvService
object using either of these.
If ID verification has previously been successful for the user, the user’s ID information and transaction ID will still exist in secure storage on their device. In this case, you can use the retained configuration to initialize IdvService
.
For example:
IdvService.Builder.initWithNewConfigFor(verificationCode)
.setApplicationId(APPLICATION_ID)
.setPushNotificationToken(PUSH_TOKEN)
.create(fragmentActivity,
(idvService) -> {
//Use IdvService
},
(error) -> {
//Handler IdvService initialization error here
});
For example:
IdvService.Builder.initWithNewConfigFromQr(qrUrl)
.setApplicationId(APPLICATION_ID)
.setPushNotificationToken(PUSH_TOKEN)
.create(fragmentActivity,
(idvService) -> {
//Use IdvService
},
(error) -> {
//Handler IdvService initialization error here
});
For example:
IdvService.Builder.initWithSavedConfig()
.setApplicationId(APPLICATION_ID)
.setPushNotificationToken(PUSH_TOKEN)
.create(fragmentActivity,
(idvService) -> {
//Use IdvService
},
(error) -> {
//Handler IdvService initialization error here
});
See the IdvService.Builder or IdvService classes for more information.
To handle the verification result or any errors while processing notifications, you can register a NotificationHandler
in IdvService.Builder. For example:
IdvService.Builder.initWithNewConfigFor(verificationCode)
.setApplicationId(APPLICATION_ID)
.setPushNotificationToken(PUSH_TOKEN)
.setNotificationHandler(NOTIFICATION_HANDLER)
.create(fragmentActivity,
(idvService) -> {
//Use IdvService
},
(error) -> {
//Handler IdvService initialization error here
});