Intent官方教程(1)简介和作用
Intents
An Intent is a messaging object you can use to request an action from another app component. Although intents facilitate communication between components in several ways, there are three fundamental use-cases:
Intent用来封装各组件跳转时的数据,行为,目标组件等信息的类。通常有下面3个功能:
- To start an activity:
An Activity represents a single screen in an app. You can start a new instance of an Activity by passing an Intent to startActivity(). The Intent describes the activity to start and carries any necessary data.
If you want to receive a result from the activity when it finishes, call startActivityForResult(). Your activity receives the result as a separate Intent object in your activity's onActivityResult() callback. For more information, see the Activities guide.
- To start a service:
A Service is a component that performs operations in the background without a user interface. You can start a service to perform a one-time operation (such as download a file) by passing an Intent to startService(). The Intent describes the service to start and carries any necessary data.
If the service is designed with a client-server interface, you can bind to the service from another component by passing an Intent to bindService(). For more information, see the Services guide.
- To deliver a broadcast:
A broadcast is a message that any app can receive. The system delivers various broadcasts for system events, such as when the system boots up or the device starts charging. You can deliver a broadcast to other apps by passing an Intent to sendBroadcast(), sendOrderedBroadcast(), or sendStickyBroadcast().
注意:没有ContentProvider
Intent官方教程(1)简介和作用的更多相关文章
- Intent官方教程(5)在manifest中给组件添加<Intent-filter>
Receiving an Implicit Intent To advertise which implicit intents your app can receive, declare one o ...
- Intent官方教程(4)用Intent构造应用选择框
Forcing an app chooser When there is more than one app that responds to your implicit intent, the us ...
- Intent官方教程(3)各属性介绍
Building an Intent An Intent object carries information that the Android system uses to determine wh ...
- Intent官方教程(2)Intent的两种类型
Intent Types There are two types of intents: Explicit intents specify the component to start by name ...
- ContentProvider官方教程(2)简介、Content URIs
In this document Overview Accessing a provider Content URIs Content Provider Basics A content provid ...
- Intent官方教程(6)常见Intent示例,启动日历,时钟,镜头等。
guide/components/intents-common.html 包含:Alarm Clock Calendar Camera Contacts/People App Email File S ...
- Layout Resource官方教程(1)简介
Layout Resource SEE ALSO Layouts A layout resource defines the architecture for the UI in an Activit ...
- ActionBar官方教程(1)简介及各区域介绍
Action Bar The action bar is a window feature that identifies the user location, and provides user a ...
- SwiftUI 官方教程
SwiftUI 官方教程 完整中文教程及代码请查看 https://github.com/WillieWangWei/SwiftUI-Tutorials SwiftUI 官方教程 SwiftUI ...
随机推荐
- (七)DAC0832 数模转换芯片的应用 以及运算放大器的学习 01
DAC0832是8分辨率的D/A转换集成芯片.与微处理器完全兼容.这个DA芯片以其价格低廉.接口简单.转换控制容易等优点,在单片机应用系统中得到广泛的应用.D/A转换器由8位输入锁存器.8位DAC寄存 ...
- struts一些实用常量配置_2015.01.04
- php扩展的基本安装
phpize ./config --with-php-config=.. make&make install php.ini
- Android中实现消息推送(JPush)
1,去JPush官网注册一个账号,创建你的app的应用,并且拿到你应用的AppKey 2,在JPush官网下载对应的sdk,解压出来,将libs文件下的所有的文件全部复制到你工程的libs文件中 3, ...
- hibernate 表配置文件如何设置表字段的默认值
修改对应实体类的配置文件,比如说 public class User{ private int age; //setter //getter } 配置文件 <property name=&quo ...
- 夺命雷公狗---DEDECMS----30dedecms数据dede_archives主表进行查询l操作
在plus目录下编写一个test2.php的文件,取出dede_archives的所有信息 <?php //编写test2.php这个文件,主要是为了实现可以取出dede_archives表的所 ...
- mysql创建视图
CREATE ALGORI`sync_user`CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER V ...
- ubuntu下配置SVN服务器
自己买的阿里云服务器.可是我老感觉没有SVN上传代码下载代码太不方便!决定配置个SVN服务器! 1.安装Subversion $ sudo apt-get install subversion $ s ...
- 什么是BI【转】
产品与服务 - 商务智能 目前,商业智能产品及解决方案大致可分为数据仓库产品.数据抽取产品.OLAP产品.展示产品.和集成以上几种产品的针对某个应用的整体解决方案 商业智能是什么? 简而言之, ...
- SQL UNION 操作符
转由http://www.w3school.com.cn/sql/sql_union.asp 这个网址的数据库知识,个人推荐,因为有实例,理解更透彻一些.非广告啊,个人感觉好啊 SQL UNION 操 ...