GDK-防止屏幕在实时显示卡上变暗 [英] GDK - keep screen from dimming on a live card

查看:68
本文介绍了GDK-防止屏幕在实时显示卡上变暗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发布了一个高频现场直播卡,当用户查看即时贴时,我希望屏幕不会变暗.

I have a high frequency live card published and I would like to keep the screen from dimming when the user is looking at the card.

我意识到这是一个重复的问题

I realize that this is a duplicate question to this one

用于Google Glass的GDK/APK-防止屏幕变暗

,但是答案似乎不再起作用.样本项目也不再停留在屏幕上.我也曾尝试获取唤醒锁,但没有成功.

but the answer seems to no longer work. The sample projects don't stay on screen anymore either. I have also tried acquiring the wake lock without success.

有没有办法让屏幕保持打开状态?

Is there a way to keep the screen on?

推荐答案

您链接的问题的答案是针对沉浸式的.使用LiveCard时,由于Glass正在处理此问题,因此无法获得唤醒锁:这实际上是LiveCard的主要好处之一,可以在Glass维护屏幕的同时保持长时间运行的应用程序.

The answer from the question you linked is for Immersion. When using a LiveCard, there is no way to get a wake lock as Glass is taking care of this: this is actually one of the main benefit of a LiveCard, keeping a long running application while Glass takes care of the screen.

如果您希望用户在使用时完全沉浸在您的应用中,则应遵循浸没模式,因为它可以让您完全控制其他屏幕.

If you want the user to be fully immersed in your app while using it, you should go with the Immersion pattern as this will give you full control other the screen.

这篇关于GDK-防止屏幕在实时显示卡上变暗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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