register

open fun <R : RegistrationCallback?> register(    @NonNull context: Context,     @NonNull userIdentifier: String,     @NonNull companyId: String,     @Nullable registrationCallback: R)

Call this method to start registration.The method should be called at the first beginning.

By calling this method you will know the login type RegistrationCallback.LoginType. After knowing the login type you need to call the right method according to login type

Parameters

context

Context: The application context

userIdentifier

String:It can be the phone number in international format or a user identifier

companyId

String:The organisation id

registrationCallback

RegistrationCallback:A callback to inform about the login type RegistrationCallback.LoginType.Possible errors may be returned please see STWAccountError


open fun register(    @NonNull context: Context,     @NonNull companyId: String,     @Nullable registrationCallback: RegisterOrganisationCallback)

Call this method to start registration with only companyId . The method should be called at the first beginning.

Parameters

context

Context: The application context

companyId

String:The organisation id

registrationCallback

RegistrationCallback:A callback to inform about the login type RegistrationCallback.LoginType.Possible errors may be returned please see STWAccountError