多个状态栏通知
我可以从一个程序(服务)在状态栏中创建多个通知,还是应该使用可点击的对象列表(例如 LinearLayout
)创建新的 Activity?
Can I create more than one notification in status bar from one program(Service) or I should create new Activity with a clickable list(for example LinearLayout
) of objects?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您当然可以从服务或应用程序创建多个通知,但您必须问自己,作为用户,您是否希望应用程序向您发送垃圾邮件通知。我一直在远程服务中使用一个通知,并通过更新其内容来重复使用同一通知。下面是一个示例:
如果您的通知不是循环的,这意味着您需要同时通知用户 3 或 4 件不同的事情,那么拥有一个打开 ListActivity 的通知将是最好的方法。
You certainly can create more than one notification from a service or application, but you have to ask yourself is, as a user, you would want an application to spam notifications to you. I've been using one notification in my remote service and reusing the same notification by just updating its content. Here is an example:
If your notifications are not revolving, meaning you need to notify the user about 3 or 4 different things simultaneously, then having a notification that opens a ListActivity would be the best way to go.