android activity,intent,service是什么关系?

 我来答
dh_darkhorse
2011-07-29
知道答主
回答量:31
采纳率:0%
帮助的人:13.5万
展开全部
intent是activity和service的桥梁,通信员,activity主要操作显示界面,service在后台运行,适合长时间运行,如下载,听歌等。。
miniapp16e43ddfde28
2011-07-29 · TA获得超过639个赞
知道小有建树答主
回答量:737
采纳率:0%
帮助的人:530万
展开全部
public class
Activity
extends ContextThemeWrapper
implements ComponentCallbacks KeyEvent.Callback LayoutInflater.Factory2 View.OnCreateContextMenuListener Window.Callback
An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View). While activities are often presented to the user as full-screen windows, they can also be used in other ways: as floating windows (via a theme with windowIsFloating set) or embedded inside of another activity (using ActivityGroup).
翻译完上面这段你就知道了什么是activity了
public class
Intent
extends Object
implements Parcelable Cloneable
An intent is an abstract description of an operation to be performed.

public abstract class
Service
extends ContextWrapper
implements ComponentCallbacks
A Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式