You need to register your users with Kruzr SDK for us to create user specific trip list, profiles and manage scoring. In order to register, you will need to create a DRIVER_ID token which you will need to share with us to register a unique user.
To ensure smooth flow of data and functionalities, user registration should be done whenever a new user is created or if an existing user logs in again.
In order to register a user with us, please call Kruzr’s Register method with the following parameters:
context
RegisterUserRequestModel
InitialisationCallback to listen for success or failure
Kruzr.getInstance().registerUser(context, registerUserRequestModel, new InitialisationCallback() {
@Override
public void onSuccess() {
}
@Override
public void onFailure(InitialisationFailureMode initialisationFailureMode){
}
});
Important Notes:
If your license key is invalid or incorrect, you will receive InitialisationFailureMode.LICENSE_KEY_INVALID in the callback and all of your subsequent calls will fail.
DriverId, name and email are compulsory in the RegisterUserRequestModel. If not provided then you will receive InitialisationFailureMode.INCOMPLETE_USER_DETAILS error
Once your user is registered, you can continue to next step wherein you will learn about creating implementations with Kruzr SDK. Please continue to next page!
Kruzr.getInstance().isRegistered(getApplicationContext(), new IsRegisteredCallback() {
@Override
public void onSuccess() {
// User is registered in the SDK
}
@Override
public void onError() {
// User is not registered in the SDK
}
});