方法 1: use PowerManager and WakeLockAndroidManifest.xml权限:
<uses-permission android:name="android.permission.WAKE_LOCK" />
程序中的代码:
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
// in onResume() call
mWakeLock.acquire();
...
// in onPause() call
mWakeLock.release();
方法 2: use the window flag FLAG_KEEP_SCREEN_ON把下面的代码加入到程序onCreate方法中:
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
// Set keep screen on
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
分享到:
相关推荐
* 1988年4月20日,发布REPRINTED WITHOUT CHANGE的版本。 * 1982年4月12日,发布REPRINTED WITHOUT CHANGE的版本。 MIL-STD-348A的重要性: MIL-STD-348A是美国军方对射频连接器接口的技术要求和检测方法的标准。...
Reprinted without change 是 MIL-STD-784B 的一个特殊版本,该版本是在1966年和1973年重新出版的,未经修改。该版本保留了原始版本的所有内容和格式。 amage Control Books for Surface Ships amage Control ...
根据提供的文件信息,本文将围绕量子力学的基本概念、其哲学问题以及从理论到应用的转变进行探讨。 ### 一、量子力学概述 量子力学是20世纪初发展起来的一个物理学分支,它研究微观粒子(如电子、光子等)的行为...
此外,还有一些页面的修订版号被标记为"NEW"或"REPRINTED",表示这些页面是新版本或是没有改动的重印版。 2. **新增章节**: 通知指出有一个新的章节301.7被添加,其发布日期也为1984年8月。 3. **保留和插入**...
"5 Nov 90 Cover REPRINTED WITHOUT CHANGE"表明封面在1990年11月5日重新印刷,但内容未发生变化。 2. 保留通知:所有持有MIL-STD-334A标准的人需要保留这份通知,并将其插入到内容目录之前,作为检查页,以确保已...
3. **修订内容的具体信息**:文档中列出了一系列页码(如110.1, 110.2, 110.7等),这些页码后都标注了“REPRINTED WITHOUT CHANGE”(重印未改动),以及修订的日期(30APRIL1987),说明这些特定页面已经按照该...
- **Figure 2.14: reprinted with permission from The Computer Language Company, Inc. Figure 17.10: Buyya, Rajkumar, High-Performance Cluster Computing: Architectures and Systems, Vol I, 1st edition, ©...
Reprinted from Communication of the ACM, Vol. 27, No. 8, August 1984, pp. 761-763. Copyright © 1984, Association for Computing Machinery, Inc. Also appears in ACM Turing Award Lectures: The First ...
No doubt this is extremely important, and I am sure all these books will have to be reprinted to satisfy the demand. But what about the plumbing? The .NET universe, like other information technology...
Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or uti- lized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including ...
# Reprinted_Applied_Energy 复刻论文Applied Energy的论文A bi-layer optimization based temporal and spatial scheduling for large-scale electric vehicles,包含考虑电动汽车有序充放电的机组组合和最优潮流 ...
reprinted : For a GPU version of this project, please refer to: The purpose of this project is to accelerate the processing speed of convolution neural network with the help of FPGA, which shows great...
No doubt this is extremely important, and I am sure all these books will have to be reprinted to satisfy the demand. But what about the plumbing? The .NET universe, like other information technology...
# Reprinted_Applied_Energy 复刻论文Applied Energy的论文A bi-layer optimization based temporal and spatial scheduling for large-scale electric vehicles,包含考虑电动汽车有序充放电的机组组合和最优潮流 ...
Reprinted material is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the ...
in the first book's preface, which is reprinted here (immediately follow ing) for convenience. The surprisingly enthusiastic response to the first book has resulted in this second effort. This book is...