Implicit Broadcasts

♀尐吖头ヾ 提交于 2019-12-11 01:52:34

问题


"Apps that target Android O can no longer register broadcast receivers for implicit broadcasts in their manifest."

ACTION_VIEW is an implicit broadcast.

According to the above statement, one can no longer register as a broadcast receiver for any URI in the manifest. The only way to listen for a URI at this point is if the app is already running?


回答1:


ACTION_VIEW is an implicit broadcast.

Not typically. ACTION_VIEW is used to start an activity, not as a broadcast Intent action.

one can no longer register as a broadcast receiver for any URI in the manifest

Broadcast receivers rarely filter on a Uri (i.e., have <data> elements in their <intent-filter>).



来源:https://stackoverflow.com/questions/42959222/implicit-broadcasts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!