Implement Callbacks
7. Add the following condition in the onActivityResult method TruecallerSDK.getInstance().onActivityResultObtained( this,requestCode, resultCode, data)
Copy
Note : In case you passed Fragment in the getUserProfile() method [ point #6 ], override the onActivityResult() method in your corresponding Fragment
8. In your selected Activity/Fragment, either make the component implement ITrueCallback or create an instance of it :
Copy
onSuccessProfileShared() method will be called in either of the following two scenarios : a.) When the user has agreed to share his profile information with your app by clicking on the "Continue" button on the Truecaller dialog b.) When a non Truecaller user is already verified previously on the same device. This would only happen when the TruecallerSdkScope#SDK_OPTION_WITH_OTP
is selected while initialising the SDK to provision for the verification of non-Truecaller users also.
Write all the relevant logic in the above callback methods to handle the scenarios appropriately.
Last updated