prevent屏幕上的调光/待机锁,而使用Android应用程序? [英] Prevent screen lock on dimming/standby while using android app?

查看:170
本文介绍了prevent屏幕上的调光/待机锁,而使用Android应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个应用程序,最后触摸我需要把它是preventing屏幕锁定时,该设备进入待机(屏幕关闭)。确切的行为,如谷歌导航。

I'm developing an application and the last touch I need to put on it is preventing the screen to lock when the device goes into standby (screen off). The exact behavior as Google Navigation.

我想知道什么,编程我将不得不使用来保持,而使用的应用程序这一功能使整个时间?

I'm wondering what, programatically I will have to use to keep this feature enable the entire time while using the app?

推荐答案

编写以下code到XML文件将prevent屏幕的锁定

writing the following code to your xml file will prevent the screen from locking

android:keepScreenOn="true"

这篇关于prevent屏幕上的调光/待机锁,而使用Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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