Send Verification SMS
To verify that the user trying to login has a SIM card with that number currently available in the device, the SDK provides a utitlity function named sendRegistrationSMS
. On Android, it supports sending the SMS in background for a smooth UX. If you prefer to open the default SMS app, it can be controlled using the silent
parameter.
Params
Name | Type | Description |
---|---|---|
context | Context | The application context. |
virtualMobileNumber | String | The verification SMS will be sent to this number (received from initiateDeviceBinding) |
smsContent | String | The content of the verification sms. This is a combination of the keyword and deviceToken separated by a space. These values are received from the initiateDeviceBinding response. Example: "flcnp token" |
simSlotIndex | int | Use this to control which SIM card to use for sending the SMS. This must be the same number as the one registered with us |
silent | Boolean | Use this to control whether the default SMS app will be opened to send the SMS. If silent is true, the SMS will be sent in the background. We strongly recommend using silent as true. |
callback | SendSMSCallback | Callback to handle the response. |
Sample
import com.falconfsauth.sdk.FalconSecureSDK;
import com.falconfsauth.sdk.SendSMSCallback;
FalconSecureSDK.sendVerificationSMS(context, virtualMobileNumber, smsContent, simSlotIndex, silent, new SendSMSCallback() {
@Override
public void onSuccess() {
// Handle success
}
@Override
public void onError(Exception e) {
// Handle error
}
});
Updated 4 months ago