Listen for SMS

Discussion in 'iPhone/iPad Programming' started by Switz213, Aug 25, 2008.

  1. macrumors 6502

    Joined:
    May 26, 2008
    #1
    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
     
  2. macrumors 6502a

    Manzana

    Joined:
    Jul 19, 2004
    Location:
    Orange County, CA
    #2
    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?
     
  3. Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    Whakatane, New Zealand
    #3
    The OP wants to fire an event when a message comes in. Nothing to do with sound :)
     
  4. thread starter macrumors 6502

    Joined:
    May 26, 2008
    #4
    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??
     
  5. thread starter macrumors 6502

    Joined:
    May 26, 2008
    #5
    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.
     
  6. macrumors 6502a

    Manzana

    Joined:
    Jul 19, 2004
    Location:
    Orange County, CA
    #6
    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 :)
     
  7. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #7
    Sorry, not possible using the public SDK.
     
  8. thread starter macrumors 6502

    Joined:
    May 26, 2008
    #8
    Yeah, wasn't sure...
    Thanks.

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

    kainjow

    Joined:
    Jun 15, 2000
    #9
    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 :)
     
  10. thread starter macrumors 6502

    Joined:
    May 26, 2008
    #10
    What if I wanted to be able to count the total amount of texts, there is no way of doing that through the SDK?
     
  11. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #11
    Nope.
     

Share This Page