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引入广播机制的用意。 #19

Open
chriszeng87 opened this issue Mar 10, 2015 · 4 comments

Comments

@chriszeng87
Copy link

No description provided.

@Trinea Trinea changed the title 注册广播有几种方式,这些方式有何优缺点?请谈谈Android引入广播机制的用意。 [问答]注册广播有几种方式,这些方式有何优缺点?请谈谈Android引入广播机制的用意。 Mar 10, 2015
@hmhm7442
Copy link

1.在清单文件中注册, 常见的有监听设备启动,常驻注册不会随程序生命周期改变
2.在代码中注册,随着程序的结束,也就停止接受广播了

@jorry
Copy link

jorry commented Mar 12, 2015

  1. 如果你代码注册,没有手动结束广播周期,你试试

@jcb316733855
Copy link

分为两种
代码注册。代码中注册方式则当有广播发出时是同时启动的。
Manifest中注册。则当有广播发出时,是顺序启动的,因为Android考虑到本身有些应用可能还未运行,同时启动会造成多个Process启动,会占用大量内存。

@01wneo
Copy link

01wneo commented Apr 15, 2018

更方便的进程,线程通信机制

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

5 participants