What are Intent Filters exactly?

后端 未结 7 1627
我寻月下人不归
我寻月下人不归 2021-02-04 02:31

I\'ve read lots of articles about intent filters and I really can\'t understand exactly what they do?

so please if anybody can explain to me with a clear example what is

7条回答
  •  梦毁少年i
    2021-02-04 03:25

    IntentFilters are used to declare a pattern of Intent attributes that the declaring component will respond to. You can specify with an IntentFilter that a given Activity, Service or BroadcastReceiver will respond to a combination of action, data mime type, scheme, path, etc. For example if you register an Activity with IntentFilter for ACTION_SEND with data type "text/plain", your Activity will be called each time the users wants to send some text.

提交回复
热议问题