android-Intents and Intent Filters and Common Intents
2015-11-24 11:14
459 查看
You can deliver a broadcast to other apps by passing an
or
Without a component name, the intent is implicit and
the system decides which component should receive the intent based on the other intent information (such as the action, data, and category—described below).
显示的意图和隐示的意图
Declares the intent action accepted, in the
Declares the type of data accepted, using one or more attributes that specify various aspects of the data URI (
Declares the intent category accepted, in the
For all activities, you must declare your intent filters in the manifest file.
an
an
a
Intentto
sendBroadcast(),
sendOrderedBroadcast(),
or
sendStickyBroadcast().
Without a component name, the intent is implicit and
the system decides which component should receive the intent based on the other intent information (such as the action, data, and category—described below).
显示的意图和隐示的意图
<action>
Declares the intent action accepted, in the
nameattribute. The value must be the literal string value of an action, not the class constant.
<data>
Declares the type of data accepted, using one or more attributes that specify various aspects of the data URI (
scheme,
host,
port,
path, etc.) and MIME type.
<category>
Declares the intent category accepted, in the
nameattribute. The value must be the literal string value of an action, not the class constant.
For all activities, you must declare your intent filters in the manifest file.
PendingIntent.getActivity()for
an
Intentthat starts an
Activity.
PendingIntent.getService()for
an
Intentthat starts a
Service.
PendingIntent.getBroadcast()for
a
Intentthat starts an
BroadcastReceiver.
相关文章推荐
- Android读取assets目录下文件数据内容
- Android res/raw文件 读取文件
- Android 触摸及手势操作GestureDetector
- 【Android】SDK和API Level版本的对应关系
- TUST项目知识点总结(Android端V1.0)
- android原生系统老系统不支持localstorage
- 50个Android开发技巧(01 好好利用layout_weight属性)
- Android VideoView简单播放视频
- android 常见分辨率(mdpi、hdpi 、xhdpi、xxhdpi )及屏幕适配注意事项
- Android开发技巧——自定义控件之自定义属性
- Android开发技巧——自定义控件之自定义属性
- AndroidStudio配置SVN以及使用代码管理
- Android技术博客收藏(持续更新)
- Android开发进阶系列(八) 界面美化之自定义弹出框
- android使用获取所有应用的资源id和uri
- Android-在手机本地保存数据和读取数据
- Android Studio 使用Gradle在Terminal终端用命令打包
- Android的四种启动模式(launchModel)
- Android开源库
- Android性能优化之常见的内存泄漏