SmsVerifyCatcherEx is the modified and extended version of SmsVerifyCatcher library,
for intercepting SMS and getting OTP from the SMS
implementation 'io.github.smaranjit:smsverifycatcherex:0.1.1'
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" /> smsVerifyCatcher = new SmsVerifyCatcher(this, new OnSmsCatchListener<String>() {
@Override
public void onSmsCatch(String message) {
String code = parseCode(message);//Parse verification code
etCode.setText(code);//set code in edit text
//then you can send verification code to server
}
});smsVerifyCatcher.onStart();
smsVerifyCatcher.onStop();
smsVerifyCatcher.setPhoneNumberFilter("777");
smsVerifyCatcher.setPhoneNumberFilterEx("senderId");