1

I'm writing an SMS receiver for an android application and have encountered an interesting problem.

First off, it works! Ok, so you might think, then what's the problem? Ok, so working and working perfectly are very different things. I am able to send SMS messages to the phone, and it triggers in my onReceive function and does what I want.

The Problem: That this only works when sending SMS messages from another phone. I've tried repeatedly sending text messages from my computer using various websites. http://www.freetxt.ca/ , http://www.txt2day.com/ . But NONE of these SMS messages sent are triggering the SMS_RECEIVED event, but they are all received by the phone as an SMS and go to my inbox.

Is this a bug? From a phone it works perfectly, from a computer it doesn't work at all. Is the event triggered from an input format that computer generated SMS's don't have?

This has me stumped. Anyone have any insight on this?

Here is part of my manifest. It works with phone SMS messages:

        <receiver android:name="com.blah.Listeners.SMSReceiver" android:enabled="true">
            <intent-filter android:priority="1000">
                <action android:name="android.provider.Telephony.SMS_RECEIVED" />
            </intent-filter>
        </receiver>
<uses-permission android:name="android.permission.RECEIVE_SMS" />

UPDATE!!: Thanks to the comments below and this posting I was able to trigger on WAP_PUSH_RECEIVED to intercept incoming MMS messages. I've added the following to my manifest file:

    <receiver android:name="com.desDemo.Listeners.PushReceiver">
  <intent-filter>
    <action android:name="android.provider.Telephony.WAP_PUSH_RECEIVED" />
    <data android:mimeType="application/vnd.wap.mms-message" />
  </intent-filter>
</receiver>
  <uses-permission android:name="android.permission.RECEIVE_MMS"/>

Does anyone know how I can get the message content from my receiver?

Community
  • 1
  • 1
Dave
  • 3,178
  • 5
  • 28
  • 44
  • Is it possible that those services are in fact sending an MMS msg and not an SMS? In most all cases those are received by the same app in the OS, but I'd bet they are not the same Receiver in API. There might not even be an MMS receiver in API, as there isnt any android API for sending MMS. – mmeyer Nov 10 '11 at 22:58
  • **FYI**: You can intercept the WAP PUSH (which is an SMS) which notifies the phone of a new MMS, [like so](http://stackoverflow.com/questions/6741378/differentiate-mms-and-sms-via-mms-sms-listeners-in-android/7965711#7965711). – Jens Nov 10 '11 at 23:08
  • Awesome! this is exactly it, I have been able to successfully trigger on a WAP_PUSH_RECEIVED any idea how to extract the message from this? I will update my question with the latest. Thanks! – Dave Nov 10 '11 at 23:26

1 Answers1

0

Credit for this solution goes to Jens.

I've updated the question to reflect the underlying issue of the question. I've moved onto other projects now, so I can't provide a better solution.

I was needing SMS messages, and thus went from a website that sent out messages triggered WAP_PUSH_RECEIVED, to actual SMS messages using a real device.

Cheers.

Dave
  • 3,178
  • 5
  • 28
  • 44