可以做吗因为每个Activity都处理了对话框,所以我想到了使用一个服务,但是再次添加一个线程,我想避免这种情况.
任何其他选项可用?
解决方法
Use the notification system — don’t
use dialog Boxes in place of
notificationsIf your background service needs to
notify a user,use the standard
notification system — don’t use a
dialog or toast to notify them. A
dialog or toast would immediately take
focus and interrupt the user,taking
focus away from what they were doing:
the user Could be in the middle of
typing text the moment the dialog
appears and Could accidentally act on
the dialog. Users are used to dealing
with notifications and can pull down
the notification shade at their
convenience to respond to your
message.
创建通知的指南如下:http://developer.android.com/guide/topics/ui/notifiers/notifications.html
原文地址:https://www.jb51.cc/java/122693.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。