三星警报应用程序如何能够永远在任何屏幕的顶部显示一个通知叠加层?

发布于 2025-02-04 13:48:33 字数 523 浏览 2 评论 0原文

基本上,这里发生的事情是在任何屏幕上显示一个覆盖层(这意味着它不是对话框,通知,也不是UI服务),

我可以想到的是自定义吐司消息,在任何屏幕上,吐司通常持续在任何屏幕上App,但是吐司不能持续超过3.5秒,如在这里

我需要做这样的事情,因为我需要对用户提醒他需要响应的传入订单。

任何关闭的事物都受到欢迎

Basically what's happening here is an overlay being displayed on any screen (meaning it is not a dialog, nor a notification, nor a ui service)

The closest I can think of is a custom toast message, where toasts usually lasts on any screen at any app, but toasts can't last more than 3.5 seconds as shown here

I need to do something like this, since I need the user to be alerted about an incoming order that he needs to be responding to.

Anything close is welcomed

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

﹉夏雨初晴づ 2025-02-11 13:48:33

阅读有关 system_alert_window 许可。它可以使您可以在/其他应用程序上的屏幕上绘制屏幕

,​​但是上面的Afaik可以让您绘制其他应用程序,但不能覆盖系统GUI。在您的GIF粘性小部件上,带有计时器的小部件也绘制在通知之上,即使使用system_alert_window,也无法在Android系统中进行。因此,再次修改了三星(实际上任何制造商)(实际上任何制造商),并根据自己的目的进行了调整,做出了一些新的可能性,并为自己的应用程序提供了适当的许可...并且您不会使用它们,因为您不知道/拥有API和DON有特权,您甚至都不要求

read about SYSTEM_ALERT_WINDOW permission. it will allow you to drawn on screen on top on your/other apps

BUT afaik above perm will let you draw on top other apps, but not covering system GUI. on your GIF sticky widget with timer is drawn also on top of notifications, thats not possible in Android system even with SYSTEM_ALERT_WINDOW. so yet again Samsung (in fact any manufacturer) modified Android and adjusted to own purposes, made some new possibilities and gave proper permissions for own apps... and you won't use them as you don't know/have API and don't have privileges, which you can't even ask for

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文