Android Wear prevent睡眠 [英] Android Wear Prevent Sleep
问题描述
我正在写要求是约10快速访问磨损小的应用程序 - 一次15分钟。问题是,当手表睡觉(屏幕完全变黑),你必须返回到开始屏幕的应用程序要回去了。
I'm writing a small wear app that is required to be quick access for around 10 - 15 minutes at a time. Problem is when the watch sleeps (screen completely blacks out) you have to go back into the start app screen to get back to it.
该数据将被保留,所以这是比什么都一个恼人的。反正是有有只腕表屏幕变暗,但没有将其关闭,直到用户退出应用程序?
The data is retained so this is more of an annoying than anything else. Is there anyway to have the watch only dim the screen but not turn it "off" until the user dismisses the app?
推荐答案
请看看来自谷歌I / O 2014年会话:
<一href=\"https://www.youtube.com/watch?v=sha_w3_5c2c#t=1241\">https://www.youtube.com/watch?v=sha_w3_5c2c#t=1241 &LT; - 20:42
Please take a look at a session from Google I/O 2014:
https://www.youtube.com/watch?v=sha_w3_5c2c#t=1241 <- 20:42
贾斯汀谈到有关于的android:keepScreenOn =真正的
属性为prevent超时,后退到主屏幕的行为
Justin talks there about android:keepScreenOn="true"
attribute to prevent the timeout and "back to homescreen" behavior.
请阅读更多关于保持屏幕上的位置:<一href=\"https://developer.android.com/training/scheduling/wakelock.html#screen\">https://developer.android.com/training/scheduling/wakelock.html#screen
Please read more info about keeping screen on here: https://developer.android.com/training/scheduling/wakelock.html#screen
这篇关于Android Wear prevent睡眠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!