开发者

How to poweroff android mobile [duplicate]

开发者 https://www.devze.com 2023-03-29 05:10 出处:网络
This question already has answers here:开发者_如何学Go Closed 11 years ago. Possible Duplicate: How to power off an Android device?
This question already has answers here: 开发者_如何学Go Closed 11 years ago.

Possible Duplicate:

How to power off an Android device?

I have a requirement to implement power-off functionality on android. I am unable to get that. Is there anything I can call then my mobile will power-off. How do I write code to power-off?

Thanks


Sorry, there is no way to do it !


I found there is no API in the Android SDK to allow user apps to do this. Force the device to go to sleep using PowerManager.goToSleep()

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号