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?