if (bundle != null) {
Object[] pdus = (Object[]) bundle.get("pdus");
SmsMessage[] mges = new SmsMessage[pdus.length];
for (int i = 0; i < pdus.length; i++) {
mges[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
}
for (SmsMessage mge : mges) {
sb.append("短信来自:" + mge.getDisplayOriginatingAddress() + "\n");
sb.append("短信内容:" + mge.getMessageBody());
}
Toast.makeText(arg0, sb.toString(), Toast.LENGTH_LONG).show();
}
想识别号码是不是123456,如果是,阻止传播
如果不是就让广播通行,就当我没拦截过,怎么改,谢谢
//abortBroadcast();