得不到短信即使设置了最高优先级,首先安装 [英] not get sms even when set the highest priority and installed first

查看:128
本文介绍了得不到短信即使设置了最高优先级,首先安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装GO短信时,我的应用程序没有收到短信。我设置的最高优先级,并试图安装GO短信应用程序之前安装我的应用程序。然而,GO短信总能得到我的短信之前。 (第一次应用内安装的概念并不在我的手机的工作。)

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.)

我很好奇的GO短信开发人员做的。如何能矿之前他们的应用程序总是拦截短信?

I am curious what the Go SMS developers do. How can their app always intercept SMS before mine?

我的应用程序工作正常,无GO短信。总之,这里是我的清单。也许我做错了什么。

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>

我发现其他<一href="http://stackoverflow.com/questions/6600266/sup$p$pss-block-broastreceiver-in-another-app">questions与我的问题,但仍然不能找到解决它的方法。

I found other questions related to my issue but still can't find the way to fix it.

编辑:我的测试项目是在Github:<一href="https://github.com/entryleveldev/ansmsreceiver">https://github.com/entryleveldev/ansmsreceiver.

my test project is on Github: https://github.com/entryleveldev/ansmsreceiver.

EDIT2:仍然不知道如何机器人决定其接收器先拿到的意图。从我测试过,GO短信总是得到的意图。 UID和安装顺序并不重要。 但是,当我测试我的应用程序和Handcent短信,安装顺序很重要。也许去SMS使用某种形式的哈克的方式来做到这一点。

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.

这里的SmsReceiver的GO短信清单。

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>

他们的默认设置为禁用其他消息通知(abortBroadcast)。这实在是对我不好。

Their default setting is to disable other message notification (abortBroadcast). This is really bad to me.

推荐答案

我也面临同样的问题。

I have faced the same problem.

根据搭载Android的文件,最优先的是1000 的http://developer.android.com/reference/android/content/IntentFilter.html#SYSTEM_HIGH_PRIORITY

As per the documentation by Android, Highest priority must be 1000 http://developer.android.com/reference/android/content/IntentFilter.html#SYSTEM_HIGH_PRIORITY

但是这种应用程序是使用一个更高的优先级回避准则。

But this application is using a higher priority evading the guidelines.

http://forum.avast.com/offline/forum。 theftaware.com/viewtopic5dcd.html

不作恶的你最好遵循的准则。

Don't Be Evil You better follow the guidelines.

干杯

这篇关于得不到短信即使设置了最高优先级,首先安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆