深入理解Intent和IntentFiler(二)
Jiangdg_VIP
http://blog.csdn.net/u012637501
在上一篇文章中,我们比较详细学习了"Intent"的相关知识,现在将学习如何设置Intent对象的这些属性以及如何使用他们来启动组件。Intent对象是一组信息,我们可以通过设置其Action、Data、Category属性来...
分类:
移动开发 时间:
2014-11-13 16:36:20
阅读次数:
296
之前在网上找到到好几种办法,发现要么不行要么太麻烦,现在提供一种比较方便简单地方法,在此记录一下:Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra("android.intent.extras.C...
分类:
移动开发 时间:
2014-11-13 15:56:05
阅读次数:
1910
Intent的构成Intent能够带有action,data(由URI表达),extra data(key/value map,键值对),指定的类名(成为component name)。一个intent至少携带上述的一个内容。Action。Action名,在上一笔记中已经给出两种样例,一种是系统自带...
分类:
移动开发 时间:
2014-11-13 14:21:33
阅读次数:
243
当Intent在组件间传递时,组件假设想告知Android系统自己可以响应和处理哪些Intent,那么就须要用到IntentFilter对象。 顾名思义,IntentFilter对象负责过滤掉组件无法响应和处理的Intent,仅仅将自己关心的Intent接收进来进行处理。 IntentFilter实...
分类:
其他好文 时间:
2014-11-13 12:52:01
阅读次数:
179
Intent可以说是Android的灵魂,程序跳转和传递数据的时候基本上就是靠Intent了。Intent在Android应用中是相当重要的,理解Intent对应用编程很有帮助。在Android的官方API文档里边对Intent是这样定义的:An Intent is an abstract description of an operation to be performed。一个Intent就是...
分类:
移动开发 时间:
2014-11-13 11:00:32
阅读次数:
246
界面activity_main.xml<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_..
分类:
移动开发 时间:
2014-11-13 07:13:43
阅读次数:
253
界面activity_main.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29...
分类:
其他好文 时间:
2014-11-12 23:08:19
阅读次数:
546
Activity之间参数传递
A activity想将参数传给B activity时可以利用Intent将消息带过去
Intent intent = new Intent(this,BActivity.class);
intent.putExtra("xxxx", "xxxx");
数据量多的话可以使用
Bundle bundle = new...
分类:
其他好文 时间:
2014-11-12 23:01:48
阅读次数:
338
Intent ---? 表达自己的意图 ? 通过 Intent 可以启动 (activity、service、BroadcastReceiver) ? Intent 是程序组件之间通信的重要媒介 ? 一个Intent 对象只能包含一个Action ? Intent属性:Component...
分类:
移动开发 时间:
2014-11-12 15:08:09
阅读次数:
216
pendingIntent字面意义:等待的,未决定的Intent。
要得到一个pendingIntent对象,使用方法类的静态方法 getActivity(Context,
int, Intent, int), getBroadcast(Context,
int, Intent, int), getService(Context,
int, Intent, int) 分别对应着In...
分类:
移动开发 时间:
2014-11-12 11:52:04
阅读次数:
235