My app does not receive SMS when Go SMS is installed. I set the highest priority and have tried installing my app before installing the Go SMS app. However, Go SMS always get SMS before mine. (The first-app-installed concept doesn't work on my phone.)
I am curious what the Go SMS developers do. How can their app always intercept SMS before mine?
My app works fine without the Go SMS. Anyway, here is my manifest. Maybe I've done something wrong.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.ansmsreceiver"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.test.ansmsreceiver.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="com.test.ansmsreceiver.SMSReceiver" >
<intent-filter android:priority="2147483647">
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
<action android:name="android.provider.Telephony.NEW_OUTGOING_SMS" />
</intent-filter>
</receiver>
</application>
I found other questions related to my issue but still can't find the way to fix it.
Edit: my test project is on Github: https://github.com/entryleveldev/ansmsreceiver.
Edit2: still not sure how android decides which receiver get the intent first. From what I've tested, Go SMS always gets the intent. UID and install order do not matter. But when I tested my app and Handcent SMS, the install order does matter. Maybe Go SMS uses some kind of a hacky way to do this.
Here's the SmsReceiver in Go SMS manifest.
<receiver android:name=".smspopup.SmsReceiver" android:permission="android.permission.BROADCAST_SMS">
<intent-filter android:priority="2147483647">
<action android:name="android.provider.Telephony.SMS_RECEIVED"></action>
<category android:name="android.intent.category.DEFAULT"></category>
</intent-filter>
<intent-filter android:priority="2147483647">
<action android:name="android.provider.Telephony.GSM_SMS_RECEIVED"></action>
<category android:name="android.intent.category.DEFAULT"></category>
</intent-filter>
<intent-filter >
<action android:name="android.provider.Telephony.WAP_PUSH_RECEIVED"></action>
<data android:mimeType="application/vnd.wap.mms-message"></data>
</intent-filter>
<intent-filter >
<action android:name="com.android.mms.transaction.MESSAGE_SENT"></action>
</intent-filter>
</receiver>
Their default setting is to disable other message notification (abortBroadcast). This is really bad to me.