Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Service 使用指南 #6

Open
zhangsr opened this issue Dec 3, 2015 · 0 comments
Open

Android Service 使用指南 #6

zhangsr opened this issue Dec 3, 2015 · 0 comments

Comments

@zhangsr
Copy link
Owner

zhangsr commented Dec 3, 2015

一、是什么

Service 继承自 Context,相当于与 Activity 同级的运行上下文。

二、特点

  • 无交互
  • 后台运行:不受界面、应用切换的影响
  • 自重启
  • 默认在主线程执行,一般会另起线程

三、启动方式

Stated 方式

典型使用场景:社交应用的在线心跳 (与 Activity 单向通信)

Bound 方式

典型使用场景:音乐播放(与 Activity 双向通信)

四、选用决策图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant