Text message intent - catch and send
Posted
by Espen
on Stack Overflow
See other posts from Stack Overflow
or by Espen
Published on 2010-04-24T15:11:22Z
Indexed on
2010/04/24
15:13 UTC
Read the original article
Hit count: 323
android
Hi!
I want to be able to control incoming text messages. My application is still on a "proof of concept" version and I'm trying to learn Android programming as I go.
First my application need to catch incomming text messages. And if the message is from a known number then deal with it. If not, then send the message as nothing has happened to the default text message application.
I have no doubt it can be done, but I still have some concern and I see some pitfalls at how things are done on Android.
So getting the incomming text message could be fairly easy - except when there are other messaging applications installed and maybe the user wants to have normal text messages to pop up on one of them - and it will, after my application has had a look at it first.
How to be sure my application get first pick of incomming text messages?
And after that I need to send most text messages through to any other text message application the user has chosen so the user can actually read the message my application didn't need.
Since Android uses intents that are relative at best, I don't see how I can enforce my application to get a peek at all incomming text messages, and then stop it or send it through to the default text messaging application...
© Stack Overflow or respective owner