Setup the application
In this guide you will:
- Request permissions needed by SDK to intercept the incoming flashcall automatically.
- Proceed with the verification flow with the number typed by the user.
Request permissions
Although the SDK can work without all the permissions being granted by the user, for best user experience, we highly recommend requesting these as in such a case the incoming phone call can be automatically intercepted by the SDK and reported to the Sinch Platform.MainActivity.kt
code snippet shows how to request them and proceed with the verification once all of them are granted. Permissions requested here should also be listed in the AndroidManifest.xml
file. You can read more about Android permissions here.Pass number to verify
For simplicity we simply pass the number typed by the user without any reformatting or validation.
binding.phoneInputEditText.text.toString()
In order the verification to succeed the number must be in E.164 Format, e.g. Netherlands 0639111222 -> +31639111222. See phone numbers section to read more about phone numbers handling. Note that as long as you're using a test account you have to add the number you're trying to verify to your verified numbers tab in the dashboard.
Next steps
Once we have the number to be verified and required permissions granted it's time to initiate yout first flashcall verification request!
Additional resources
Learn more about the Verification API: