如何把Android的编程待机? [英] How to put Android to standby programmatically?

查看:116
本文介绍了如何把Android的编程待机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是它在某种程度上可以设置的Andr​​oid到待机模式编程?

Is it somehow possible to set Android to standby-mode programmatically ?

推荐答案

如果您正在开发自己的ROM或者你有一个根深蒂固的手机(它的需要检查哪些用户是能够做到这一点),那么你应该有一个放眼PowerManager.goToSleep功能。 这里是关于在此功能的讨论谷歌组。和<一个href=\"http://stackoverflow.com/questions/5710971/android-what-permissions-required-to-call-powermanager-gotosleepn-put-device-i\">here你可以阅读有关此特定的权限。

If you're developing your own ROM or you have a rooted phone (it's need to be checked which user is able to do this) then you should have a look to the PowerManager.goToSleep functionality. Here is a discussion about this function in the Google Groups. And here you can read about this particular permission.

这篇关于如何把Android的编程待机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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