Can I hide SMS on Android?
I would like to develop an 开发者_如何学Goapplication for Android 3.0 with only one button... When I click on this button I should HIDE all the SMS sent from a specific phone number.
Is it possible?
Yea u can hide the Receiving SMS from the particular Number
Just paste the code in your receiving broadcast receiver class
if (senderphonenumber != null && senderphonenumber.equals("9400000000")) {
// Process our sms...
abortBroadcast();
}
In your Manifest File put these code, and set a higher value for android priority
<receiver android:name=".SmsFilter">
<intent-filter android:priority="1000">
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
Also don't forget to give the necessary permission
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
You can either delete these SMS (and save them to file etc.) or replace Messaging app with your own.
精彩评论