intent intent-filter
来源:互联网 发布:白夜追凶小说结局知乎 编辑:程序博客网 时间:2024/04/24 08:46
Intent 有两种形式:
1.显示意图指定一个目标组件通过其name( Component name field如一个Activity类), 由于组件名称通常不会被其它应用程序的开发者知道。所以,显示意图通常用在应用程序内部消息。----如:一个Activity 启动一个从属的service或者启动另一个activity
2.隐式意图不指定目标组件名称(component name 是空的,通过一个字符串Action或URI)隐式意图通常用于去激活其它应用程序的组件
如果一个组件没有intent filter, 那么它只能接受显式intent,如果有, 则能同时显示意图和隐式意图。
intent filter要匹配一个intent,需要同时满足三点:匹配Action、匹配category、匹配data
intent-filter列表中可以有多个Action,只要intent匹配列表中的任何一个Action,则通过Action的匹配;
一个intent可以包括多个category,intent中的每个category在intent-filter都有匹配项才算通过Action匹配;
每个< data > 元素可以指定一个 URI 和 一个 data type (MIME media type) . URI 有以下几个属性组成 : schema, host,port,path
0 0
- Intent 和Intent Filter
- Android intent intent-filter
- Android intent intent-filter
- Intent 和 Intent Filter
- Intent 和 Intent Filter
- Intent和Intent Filter
- Intent 和 Intent Filter
- Intent 和 Intent Filter
- Intent 和 Intent Filter
- Intent 和 Intent Filter
- Intent 和 Intent Filter
- Intent和Intent-filter
- Android intent intent-filter
- Intent 和 Intent Filter
- Intent 和 Intent Filter
- Intent 和 Intent Filter
- Intent 和 Intent Filter
- intent and intent-filter
- innobackupex存储备份历史
- HDU 1029 Ignatius and the Princess IV
- Jboss EJB实现实例
- js解析json数据
- TableViewController_01
- intent intent-filter
- oracle树形结构由子节点递归得到父节点
- 什么是格式化字符串攻击?
- Jetty实战之 嵌入式Jetty运行web app
- spring+quartz动态定时器
- 有关毕业设计--题目选定
- 【v2.x OGE教程 17】事务处理
- 实现java mail发送邮件
- java中Date与String的相互转化