共 8 篇文章 |
|
java代码:<intent-filter><action android:name="android.intent.action.INSERT" /><category android:name="android.intent.category.DEFAULT" /><data android:mimeType="vnd.android.cursor.dir/vnd.google.note" /></intent-filter> 复制代码 该activity的第二个目的... 阅1822 转8 评0 公众公开 12-02-11 14:39 |
阅2074 转8 评0 公众公开 12-02-11 14:38 |
Android Intent和Intent Filter详解(三) 一个intent对象只能指定一个action, 而一个intent filter可以指定多个action. action列表不能为空, 否则它将组织所有的intent.java代码:<intent-filter ...><action android:name="code android.intent.action.MAIN" /><category android:name="code android.intent.... 阅4067 转11 评0 公众公开 12-02-11 14:38 |
activity, service和broadcast receiver可以有多个intent filter来告知系统它们能接受什么样的隐式intent. intent filter的名字很形象: 它过滤掉不想接受的intent, 留下想接受的intent. 显式intent无视intent filter.一个组件对能做的每件事有单独的filter. 例如, 记事本程序的NoteEditor activity有两个filter -- 一个启动并显示一个特定的记... 阅1988 转11 评0 公众公开 12-02-11 14:37 |
Android Intent和Intent Filter详解(一) Intents and Intent Filters Intent Objects Intent对象 Intent Resolution Intent解析 Intent filters Filters and security Filter和安全 Common cases 常见情况 Using intent matching 使用intent匹配 Note Pad Example 例子:记事本。Intents and ... 阅1477 转12 评0 公众公开 12-02-11 14:36 |
阅331 转4 评0 公众公开 12-02-11 14:17 |
Intent对象讲解。什么是Intent ?Intent是一种运行时绑定(runtime binding)机制,它能在程序运行的过程中连接两个不同的组件。通过Intent,你的程序可以向Android表达某种请求或者意愿,Android会根据意愿的内容选择适当的组件来响应。详细解释可以看上一章《什么是Intent》Intent对象包含了一下一些信息:我们就用一个例子来看看Intent对象是... 阅1441 转13 评0 公众公开 12-02-11 14:16 |
比如,有一个Activity希望打开网页浏览器查看某一网页的内容,那么这个Activity只需要发出WEB_SEARCH_ACTION请求给Android,Android 会根据Intent的内容,查询各组件注册时的声明的IntentFilter,找到网页浏览器Activity来浏览网页。对于明确指出了目标组件名称的Intent,我们称之为“显式Intent”,对于没有明确指出目标组件名称的Intent,我们... 阅1046 转16 评0 公众公开 12-02-11 14:15 |