ACTION_SCREEN_ON 使屏幕打开或仅告知此操作?

发布于 2025-01-05 01:25:39 字数 243 浏览 3 评论 0原文

发送会

private static final String Screenon = Intent.ACTION_SCREEN_ON;
sendBroadcastMessage(Screenon);

打开屏幕吗?借助这个意图,我们只能找出屏幕是否会打开,对吗?

我需要知道它只是决定给我们的给定的 util 类是否可以正常工作(此类必须打开/关闭屏幕,并且它尝试通过这些意图来做到这一点)

does sending

private static final String Screenon = Intent.ACTION_SCREEN_ON;
sendBroadcastMessage(Screenon);

turns screen on? with the help of this intent we can only find out, if the screen is going to be turned on, am i right?

i need ti know it just decide whether the given util class given to us works fine (this class must turn screen on/off and it tries to do so via these intents)

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

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

发布评论

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

评论(1

飘过的浮云 2025-01-12 01:25:39

是的,这个 BroadcastMessage 应该打开屏幕。如果没有这样做,请查看
AndroidManifest.xml - 应用程序需要权限才能执行此操作。

yes, this BroadcastMessage should turn the screen on. If it doesnt do that, look into
the AndroidManifest.xml - the app needs permissions to do that.

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