开发者

Possible to set BroadcastReceiver priority programmatically?

Is it possible to set the priority attribute of a BroadcastReceiver programmatically or can it only be done in XML? Relevant documents include:

http://developer.android.com/reference/android/content/BroadcastReceiver.html

开发者_JS百科http://developer.android.com/reference/android/R.styleable.html

It doesn't seem so, but I don't fully understand the relationship of android.R.styleable to a given application and its activities...


You don't set priority on BroadcastReceiver (or Activity) objects, but instead on the IntentFilter object(s) that cause these items to be started.

With that in mind, IntentFilter.setPriority() is what you want to use.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜