先给大家展示下效果图,如果大家感觉不错,请参考实现代码。
1.自定义监听类
/**
* 短信监听器,用于自动填充验证码
*/
public class SMSContentObserver extends ContentObserver {
public final String SMS_URI_INBOX = content://sms/inbox;//收信箱
private Activity activity = null;
private String smsContent = ;//验证码
private EditText verifyText = nul
1