如何以编程方式访问 Android 锁定屏幕中显示的内容

发布于 2024-08-21 18:59:23 字数 447 浏览 4 评论 0原文

今天,我正在寻找一种方法来模仿我从 HTC Hero 的锁定屏幕中了解到的行为:日历和闹钟可以放置文本和闹钟。那里有可绘制的东西来通知即将发生的事件或过期的警报。锁定屏幕仍保留在那里,因为必须向下拖动它才能消除显示的事件,并且可能还有一个“暂停”按钮。

但是,第一个问题:这是默认的 Android 东西还是 HTC Sense 特定的东西? 第二个问题:如果这是一个常见的 Android 问题,为什么我在 Google 的 Android 文档中找不到与我的问题接近的主题“lockscreen”或“lock screen”的任何内容?它的 API 在哪里?

我的问题是:我想立即通知用户 - 即使我尝试标准通知,锁定屏幕的用户也必须将其解锁并向下拖动通知列表才能查看和通知。清楚发生了什么事。 叹气 设置无休止地播放通知声音是一件麻烦事,因为至少需要向下滑动两次才能停止声音播放!

对此有任何提示吗? 谢谢!

Today I am looking for a way to mimic the behavior I know from my HTC Hero's lock screen: the calendar and alarm clock can put text & drawables there to inform about an upcoming event or an expired alarm. The lock screen remains there in that it must be dragged down to dismiss the shown event and there might also be a Snooze button.

But, first question: is this default Android stuff or HTC Sense specific only??
Second question: If it is a common Android thing, why can't I find anything in Google's Android documentation for the topics "lockscreen" or "lock screen" that comes close to my question? Where's the API for it?

My problem is: I want to inform the user immediately - even if I try a standard notification, the user with a locked screen will have to unlock it and drag down the notifications list to see & clear what's going on. sigh Putting an endlessly playing notification sound there is a hassle as it takes at least two swipes down to stop the sound playing!

Any hints on this?
Thanks!

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

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

发布评论

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

评论(2

只有一腔孤勇 2024-08-28 18:59:23

这是默认的 Android 东西还是 HTC
仅感知特定?

仅限 HTC Sense。您无法通过 SDK 代码修改设备的锁定屏幕——只能通过固件修改。对不起!

is this default Android stuff or HTC
Sense specific only?

It is HTC Sense only. You cannot modify the lock screen of the device from SDK code -- only via firmware modifications. Sorry!

短叹 2024-08-28 18:59:23

这个问题有点绕远了……
但壁纸显示在锁屏上。所以你可以编写一个自定义壁纸来在锁定屏幕上显示你的信息。 (我认为)。

It's kind of o long way around the problem...
but the wallpaper is shown on then lockscreen. so you clould write a custom wallpaper to display your info on the lockscreen. (i think).

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