Notification.Builder和FLAG_INSISTENT [英] Notification.Builder and FLAG_INSISTENT

查看:211
本文介绍了Notification.Builder和FLAG_INSISTENT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢的易用性 Notification.Builder 的,但它似乎不支持通知的迫切模式。

I like the ease of use of Notification.Builder but it seems not support the insistent mode of notifications.

有没有一种方法来设置标志 FLAG_INSISTENT Notification.Builder

Is there a way to set the flag FLAG_INSISTENT from the Notification.Builder?

推荐答案

不直接。有关于 Notification.Builder 私人 setFlag()方法 - 我不知道为什么他们没有暴露

Not directly. There is a private setFlag() method on Notification.Builder -- I do not know why they did not expose it.

不过,您可以配置通知的其余部分通过生成器,然后调整已完成的标志通知对象。

However, you can configure the rest of the Notification via a Builder, then adjust the flags on the completed Notification object.

或者,抢$ C $下 Notification.Builder 并修改它来创建自己的暴露 setFlag(),或者增加 setInsistent()等。

Or, grab the code for Notification.Builder and modify it to create your own that exposes setFlag(), or adds setInsistent(), etc.

这篇关于Notification.Builder和FLAG_INSISTENT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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