PDA

View Full Version : Listen for SMS




Switz213
Aug 26, 2008, 12:06 AM
I searched around and couldn't find the exact answer to this specific question. Is there anyway to make the iPhone "listen" for a text message. I don't need to know anything about the text message or who its from, just that one came. Also, if possible to listen for a sent text message too.

Thanks,
Switz



Manzana
Aug 26, 2008, 12:14 AM
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)

there is a notification sound that plays when a message comes in, is that what you mean?

Nermal
Aug 26, 2008, 12:15 AM
The OP wants to fire an event when a message comes in. Nothing to do with sound :)

Switz213
Aug 26, 2008, 12:16 AM
I mean within the code. I want the code to "listen" for an SMS. The only trouble I see is that apps can't run in the background, but maybe something will work??

Switz213
Aug 26, 2008, 12:17 AM
The OP wants to fire an event when a message comes in. Nothing to do with sound :)

Well not necessarily have something happen, but I want an application to be able to know its happened and something in that application happen. I feel like what I said before might stop this though.

Manzana
Aug 26, 2008, 12:18 AM
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)

Oh yeah, my mistake :)

kainjow
Aug 26, 2008, 12:44 AM
Sorry, not possible using the public SDK.

Switz213
Aug 26, 2008, 12:47 AM
Sorry, not possible using the public SDK.

Yeah, wasn't sure...
Thanks.

What about analyzing the current amount of text messages and returning basic info about it.

kainjow
Aug 26, 2008, 12:49 AM
You can't get any kind of information about text messages. Only thing you can do is create a new message using the sms:// URL, and even that is undocumented :)

Switz213
Aug 26, 2008, 12:51 AM
You can't get any kind of information about text messages. Only thing you can do is create a new message using the sms:// URL, and even that is undocumented :)

What if I wanted to be able to count the total amount of texts, there is no way of doing that through the SDK?

kainjow
Aug 26, 2008, 12:55 AM
Nope.