状态栏、活动或服务哪个?
我只是想知道哪个是状态栏、活动还是服务? 能否查看状态栏是否下拉? 感谢
编辑: 这是我的意思是状态栏:
I just wonder Which is a status bar,an activity or service?
Can I check whether the status bar is pulled down or not?
Thanks
Editted:
THis is status bar that I meant:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以认为状态栏是一项服务 StatusBarManager 对于 ui,当状态栏拉下时,您的 Activity 将调用
onStop
,当状态栏拉起时,您的 Activity 将调用onResume
you can think status bar is a service StatusBarManager with a ui, when the status bar pulled down, your activity will invoke
onStop
, when the status bar pulled up, your activity will invokeonResume
状态栏通知可以从活动/服务触发,您通常会从服务创建状态栏通知。这样,当用户正在使用其他应用程序或设备处于睡眠状态时,可以从后台创建通知。我希望此链接可以帮助您了解更多信息。 状态栏
Staus bar notification can be triggered from both Activity/Service, you will usually create status bar notifications from a service. This way, the notification can be created from the background, while the user is using another application or while the device is asleep.I hope this link help you understand more. Status bar