Intent和Intent Filters
什么是Intent
//this为应用程序的上下文,MyActivity是自定义类
Intent intent = new Intent(this, MyActivity.class)
CATEGORY_DEFAULT category<activity
android:name="com.example.intentdemo.IntentActivity"
android:label="@string/title_activity_intent" >
<intent-filter>
<action android:name="com.example.MYACTION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Intent intent = new Intent("com.example.MYACTION");
startActivity(intent);
如,Activity名称,Service名称等。当我们使用显式intent的时候,我们就要使用这些组件的名称来构造Intent
<data android:scheme="string"
android:host="string"
android:port="string"
android:path="string"
android:pathPattern="string"
android:pathPrefix="string"
android:mimeType="string" />
包括指向你要操作的数据的Uri或者你的组件可处理(接受)的数据的类型
Intent和Intent Filters的更多相关文章
- Android开发-API指南-Intent和Intent过滤器
Intents and Intent Filters 英文原文:http://developer.android.com/guide/components/intents-filters.html 采 ...
- android intent和intent action大全
1.Intent的用法:(1)用Action跳转1,使用Action跳转,如果有一个程序的AndroidManifest.xml中的某一个 Activity的IntentFilter段中 定义了包含了 ...
- intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
ActivityA到ActivityBintent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);//ActivityB不加入后退栈android:noHisto ...
- ActivityGroup相关--getLocalActivityManager() 以及intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)用法
ActivityGroup简介 1.ActivityGroup的核心就是继承了该类,能够通过getLocalActivityManager()得到一个LocalActivityManager 如,Lo ...
- Android菜鸟的成长笔记(9)——Intent与Intent Filter(下)
原文:[置顶] Android菜鸟的成长笔记(9)——Intent与Intent Filter(下) 接着上一篇的内容,下面我们再来看看Intent的Data与Type属性. 一.Data属性与Typ ...
- Android菜鸟的成长笔记(8)——Intent与Intent Filter(上)
原文:[置顶] Android菜鸟的成长笔记(8)——Intent与Intent Filter(上) Intent代表了Android应用的启动“意图”,Android应用将会根据Intent来启动指 ...
- Android——Intent和Intent过滤器
http://www.cnblogs.com/XP-Lee/p/3613830.html Intent就是一个激活组件的消息对象,用于组件之间的通信.需要注意的是,能被Intent激活通信的组件只有三 ...
- Android之旅-Intent与Intent Filter[上]
Intent代表了Android应用的启动“意图”,Android应用将会根据Intent来启动指定组件,至于到底启动哪个组件,取决于Intent的各个属性. 一.显式的Intent 明确指定了要启动 ...
- intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)用法
如果已经启动了四个Activity:A,B,C和D.在D Activity里,我们要跳到B Activity,同时希望C finish掉,可以在startActivity(intent)里的inten ...
随机推荐
- 学习shell中遇到的一些基础问题总结
今天入门Shell脚本编程:今天的目标是完成冒泡排序,遇到了很多问题,总结了一下: 我从c转到shell遇到了这样的一些情况: 1:首先这几个符号非常重要 $变量:把变量的值拿出来使用(所以赋值语句应 ...
- 【2016-10-12】【坚持学习】【Day3】【责任链模式】
今天学习责任链模式 例子: 采购审批系统 采购单需要经过不同人审批 采购价格<500 部门经理审批 采购价格<1000 部门主任审批 采购价格<2000 副总审批 采购价格<5 ...
- [PHP]swoole_server几个进程的分工
readme.md-/Users/zjh/Documents/我的文章/[PHP]swoole_server几个进程的分工 html{font-family: sans-serif;-ms-text- ...
- 在PYTHON中使用StringIO的性能提升实测(更新list-join对比)
刚开始学习PYTHON,感觉到这个语言真的是很好用,可以快速完成功能实现. 最近试着用它完成工作中的一个任务:在Linux服务器中完成对.xml.gz文件的解析,生成.csv文件,以供SqlServe ...
- JavaScript RegExp 对象
JavaScript RegExp 对象 RegExp 对象用于规定在文本中检索的内容. 什么是 RegExp? RegExp 是正则表达式的缩写. 当您检索某个文本时,可以使用一种模式来描述要检索的 ...
- JS客户端判断
<script language="javascript" type="text/javascript"> function browserDete ...
- linux进入软连接所指向的原目录
软连接就是一个快捷方式,建立软连接的方法 ln -s source-path-or-file link-file 建立硬连接 ln source-path-or-file link-file linu ...
- Java集合系列:-----------04fail-fast总结(通过ArrayList来说明fail-fast的原理以及解决办法)
前面,我们已经学习了ArrayList.接下来,我们以ArrayList为例,对Iterator的fail-fast机制进行了解.内容包括::1 fail-fast简介2 fail-fast示例3 f ...
- angular animate
angular animate 有3种:1,css transition. 2,css keyframe. 3,javascript 用jquery的animate方法: 1,2 两种是纯粹css的, ...
- 全球第一本基于Bootstrap V3.x的图书《深入理解Bootstrap》终于上市了,再次免费送书15本【活动结束】
先说活动规则,再说书的事 经过将近1年的努力,终于有了第一本自己独立编写的书:<深入理解Bootstrap>,基于最新版V 3.1 ,侧重于源码详解.架构分析.插件扩展(全新开发)实战.为 ...