Implement Callbacks

7. Add the following condition in the onActivityResult method:

TrueSDK.getInstance().onActivityResultObtained( this,resultCode, data);

8. In your selected Activity, either make the activity implement ITrueCallback or create an instance. This interface has 2 methods: onSuccesProfileShared(TrueProfile) and onFailureProfileShared(TrueError)

private final ITrueCallback sdkCallback = new ITrueCallback() {
@Override
public void onSuccessProfileShared(@NonNull final TrueProfile trueProfile) {
// This method is invoked when the truecaller app is installed on the device and the user gives his
// consent to share his truecaller profile
Log.d( TAG, "Verified Successfully : " + trueProfile.firstName );
}
@Override
public void onFailureProfileShared(@NonNull final TrueError trueError) {
// This method is invoked when some error occurs or if an invalid request for verification is made
Log.d( TAG, "onFailureProfileShared: " + trueError.getErrorType() );
}
};

Write all the relevant logic in onSuccesProfileShared(TrueProfile) for displaying the information you have just received and onFailureProfileShared(TrueError) for handling the error and notify the user.