Step1: Download the Cognalys SDK 


Step 2:Copy the downloaded  SDK to the libs folder of your project.


Step3:Use the verifyMobileNumber method in the SDK to verify the mobile number.


 

Cognalys.verifyMobileNumber(context, accessToken, app_id, phoneNumber, verificationListner);

 

verificationListner is an interface that will provide you  3 callback methods to work with.This interface is available in the Cognalys interface.


Usage eg:


           

Cognalys.verifyMobileNumber(context,"7faac41edb1ef89cbc****cd772b12a","77adda***2c3c", "9847****78", new VerificationListner() {
					
					@Override
					public void onVerificationStarted() {
					
						
					}

					@Override
					public void onVerificationSucess() {
						
						
					}

					@Override
					public void onVerificationFailed(ArrayList<String> errorList) {
					
					}
				});

 

Callback description:

onVerificationStarted(): this method tell that the verification process has started

onVerificationSuccess():this methods tells that the verification was successful.  

onVerificationFailed(ArrayList<String> errorList):This methods tells that the verification process was failed and the reason for that is given in the errorList.The details of each error code is available in the cognalys site.