I want to basically intercept a text message that has an image attached, and save that somewhere automatically. Can this work on Android?
Asked
Active
Viewed 3,579 times
2
-
If by intercept you mean detect it and block it from other applications you cant do that – Donal Rafferty Apr 29 '10 at 08:26
-
2If by intercept you mean detect it and read its contents, then yes you can. If by intercept you mean block it from other applications, then yes can do that too. – Christopher Orr Apr 29 '10 at 18:16
-
you can't attach a image to a SMS message, only MMS – Phill Pafford May 21 '10 at 14:38
1 Answers
3
Yes, this should be possible. You can set up a BroadcastReceiver
to watch for the android.provider.Telephony.SMS_RECEIVED
and parse the message out of that. There's plenty of examples on the web (and questions on StackOverflow).
As for preventing the user from seeing the original message, see also this answer:
Can we delete an SMS in Android before it reaches the inbox?

Community
- 1
- 1

Christopher Orr
- 110,418
- 27
- 198
- 193