显示默认情况下展开的android通知操作按钮 [英] Show android notification action buttons expanded by default

查看:368
本文介绍了显示默认情况下展开的android通知操作按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以在默认情况下展开的通知中显示操作按钮? 我使用进行中的通知来控制应用程序中的迁移过程.我希望在通知出现在通知区域后立即显示诸如停止"和暂停"之类的控制按钮.

Is there a way to show action buttons in notification expanded by default? I use ongoing notification to control traning process in my app. I want controling buttons such as "Stop" and "Pause" to be visible right after notification appeared in the notification area.

推荐答案

您无法展开通知.唯一的解决方案是,设置Priority Max,然后将其扩展到通知列表的顶部.而且还取决于设备.

You can't expand notification. The only solution is, set Priority Max, then the top of the notification list where it would be expanded. And it depends on the device as well.

mBuilder.setPriority(Notification.PRIORITY_HIGH)

这篇关于显示默认情况下展开的android通知操作按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆