简体   繁体   中英

Manipulate incoming SMS in Android

How to manipulate certain incoming SMS messages in Android? I want to change sender number before message will reach Inbox (so all text messages coming from a range of numbers wold be grouped into single conversation).

Can this be done from broadcast receiver of android.provider.Telephony.SMS_RECEIVED intents?

I dont think you can do it. What you get through android.provider.Telephony.SMS_RECEIVED , the data is a copy, so even if you change it wont be changed for other Recievers. You can block it from going to other Broadcasts, but not change it and rebroadcast

What you could do is manipulate using contentProvider of SMS . You will need WRITE_SMS permission

You cannot modify incoming messages in "stealth mode" and you cannot replace broadcast with your fake message without rooting and platform modifications. You can try to play with SMS using content provider but you need WRITE_SMS permission so your intentions would be clear to many.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM