开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜