Wednesday, February 5, 2014
android SMS blocking feature, experts into
Hello, I would like to ask how to do to get that information from the database just sent, then if they meet my requirements, delete it, similar to the privacy information protection 360, is to save the piece of information to and from my APP Send box removed to protect the role, I am now listening content :/ / sms table, but cell phone reception and transmission are triggered onChange function, I do not know the question now is how to get that message just sent, seeking answers.
Reply:
Nobody bird me ah? ? ?
Reply:
Reply:
Listen to the broadcast when a new messaging system will send an SMS broadcasting looks like you Baidu check
Reply:
public static final String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_RECEIVED";
Is this
Reply:
public class SMSReceiver extends BroadcastReceiver {
public static final String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_RECEIVED";
@ Override
public void onReceive (Context context, Intent intent) {
String action = intent.getAction ();
if (SMS_RECEIVED_ACTION.equals (action)) {
Bundle bundle = intent.getExtras ();
if (bundle! = null) {
Object [] pdus = (Object []) bundle.get ("pdus");
for (Object pdu: pdus) {
SmsMessage message = SmsMessage.createFromPdu ((byte []) pdu);
String sender = message.getOriginatingAddress ();
if ("written here needs to listen to the phone number". equals (sender)) {
/ / Intent i = new Intent (context, myAlert.class);
/ / I.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK);
/ / I.putExtra ("password", message.getMessageBody ());
/ / Context.startActivity (i);
. new AlertDialog.Builder (PassWordWebActivity.context) setTitle ("Your verification code:"). setMessage (message.getMessageBody ())
. SetPositiveButton ("OK", new DialogInterface.OnClickListener () {
public void onClick (DialogInterface dialog, int whichButton) {
PassWordWebActivity.state + +;
}
.}) Show ();
}
System.out.println (message.getOriginatingAddress () + ","
+ Message.getMessageBody () + ","
+ Message.getIndexOnIcc ());
}
}
}
}
}
Reply:
You did not see what I'm asking is that I ask is to send text messages, not receive text messages! ! !
Reply:
You did not see what I'm asking is that I ask is to send text messages, not receive text messages! ! !
Reply:
You did not see what I'm asking is that I ask is to send text messages, not receive text messages! ! !
Reply:
I would also like to ask texting problem. I want to get texting action. Then you should do it well.
Reply:
In fact, very clumsy way. Want to ban sending text messages. Put the message center number changed on the line.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment