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 ...
随机推荐
- 3.10.17 procfs示例
/* * wesley * the linux module sample of procfs * * wesley for testing * 2013-12-23 ...
- web性能优化系列之网站瓶颈识别
最近,公司网站的的访问量日益增大,PV马上过百万了.前期网站一到访问高峰,马上会变得很卡甚至打不开,后来做了很多优化后现在访问比较顺畅了.经过此事明白了一个道理,在遇到这类问题要做到两点,第一要相信自 ...
- 准备使用 Office 365 中国版--域名
无论是购买还是试用Office 365,每个Office 365用户都会有一个唯一的ID.在中国版的Office 365中,这个ID是一个以“.partner.onmschina.cn”结尾的域名.既 ...
- 有评论就是我最大的动力~MySQL基础篇完结(存储引擎和图形化管理工具)
hi 今天登上来,发现竟然有了3个评论~~加油吧! 这周的计划其实远远没有达到,然后下周还有一大堆事情...那么...周末好好玩吧~ 今天试图完结MySQL的基础篇知识,小白变为大白? 1.MySQL ...
- 利用HTML实现软件的UI
先看看下面的实例 这是应朋友之邀编写的查询职业技能鉴定考核的分数的软件.看过我之前的博文的,可知这是借用我之前的网页界面. 这个UI,如果用WinForm的控件来实现,难度很高. 于是另辟蹊径,用We ...
- 我要好offer之 二叉树大总结
一. 二叉树定义 二叉树具有天然的递归特性,凡是二叉树相关题,首先应该联想到递归 struct BinTreeNode { BinTreeNode* left; BinTreeNode* right; ...
- Nodejs 请求转发代理
var sendPromise = function (res, callback) { var options = { hostname: settings.Ip, port: settings.P ...
- 模版(template)
模版(template) 在c++Template中很多地方都用到了typename与class这两个关键字,而且好像可以替换,是不是这两个关键字完全一样呢? 相信学习C++的人对class这个关键字 ...
- Thread对象的yield(),wait(),notify(),notifyall()
Thread类中的主要方法: join()方法:让一个线程强制运行,线程强制运行期间,其他线程无法运行,必须等到此线程完成之后才可以继续执行. setDaemon():设置线程为后台线程,这样即使Ja ...
- Android驱动入门-LED--测试APP编写③
硬件平台: FriendlyARM Tiny4412 Cortex-A9 操作系统: UBUNTU 14.04 LTS 时间:2016-09-24 10:47:03 在Android Studio中 ...