Android的 - 短信 - 意图过滤器优先上市 [英] Android - SMS - intent-filters priority listing
问题描述
我不知道是否有可能发现,包括关联到某个动作的所有接收器的列表。
I was wondering if it is possible to find a list that includes all the receivers associated to a certain action.
例如我有以下的接收器,每次执行该短信接收:
For example I have the following receiver that executes everytime that an SMS is received:
<receiver android:name=".SmsReceiver" android:enabled="true">
<intent-filter android:priority="101">
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
因此,与优先级=101比Android的默认邮件服务,甚至之前执行汇入作业。
So with the priority="101" it´s executed even before than the default message service in Android.
我想找到所有关联到certail行动意图过滤器,在这种情况下,android.provider.Telephony.SMS_RECEIVED
I would like to find all the intent-filter associated to a certail action, in this case "android.provider.Telephony.SMS_RECEIVED"
我试图进入/data/data/com.android.provider.telephony/databases但没有信息都存储在疗法。
I tried to get into /data/data/com.android.provider.telephony/databases but no info is stored in ther.
这将是巨大的,如果有人可以告诉我,我在哪里可以找到这些信息,即使是可能的。
It would be great if anybody could tell me where can I find that info, and even if it is possible.
问候,
巴勃罗
推荐答案
使用软件包管理系统
和 queryBroadcastReceivers()
来找出所有的 BroadcastReceivers
,将一个给定的回应意图
。在你的情况,你会创建一个 SMS_RECEIVED
意图
。
Use PackageManager
and queryBroadcastReceivers()
to find out all of the BroadcastReceivers
that will respond to a given Intent
. In your case, you would create an SMS_RECEIVED
Intent
.
这篇关于Android的 - 短信 - 意图过滤器优先上市的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!