onRequestPermissionsResult()
to pass the permissions results back to the SDK like this
ITrueCallback#onVerificationRequired(),
you can initiate the verification for the user by calling the following method:TruecallerSDK.getInstance().requestVerification()
method, you will receive either a callback in your VerificationCallback
instance with a specificrequestType
as described belowVerificationCallback.TYPE_MISSED_CALL_INITIATED
VerificationCallback.TYPE_MISSED_CALL_RECEIVED
VerificationCallback.TYPE_OTP_INITIATED
VerificationCallback.TYPE_OTP_RECEIVED
VerificationCallback.TYPE_VERIFICATION_COMPLETE
VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE
VerificationCallback.TYPE_MISSED_CALL_INITIATED
or VerificationCallback.TYPE_OTP_INITIATED
, you will receive an additional parameter for the time to live i.e TTL (in seconds) which is passed as String extra in the VerificationDataBundle
of onRequestSuccess()
. This value determines amount of time left to complete the verification. You can use this value to show a waiting message to your user before they can try for another attempt. Once the TTL expires, you can either auto-retry the verification by calling the requestVerification() method automatically with the same input parameters OR you can also take the user back to the number input screen to enter a different number for verification.//For when the control goes to TYPE_ALREADY_VERIFIED_BEFORE extras.getProfile().accessToken
//For when the control goes to TYPE_VERIFICATION_COMPLETE extras.getString(VerificationDataBundle.KEY_ACCESS_TOKEN)
TrueException#getExceptionMessage().
For details of different possible error types you may encounter, please refer to the next section