Keep Windows Mobile 6 phone alive

丶灬走出姿态 提交于 2019-12-06 07:53:31

问题


I am making an application for Windows Mobile 6.1 Pocket PC (Touchscreen). I know when a Pocket PC's screen turns off, it goes into a standby mode and applications are pretty much halted in the background. My application can't do that. It needs to keep going. So my question is, how can I keep the phone alive (backlight turned on) until my application is done?

An example of this would be video streaming applications such as Youtube. It keeps the phone on while the video is playing.


回答1:


As long as your app is doing something (in a loop or a Timer) it is relatively easy, you need:

public static class CoreTools
{
    [DllImport("coredll.dll")]
    public static extern void SystemIdleTimerReset();
}

And then call SystemIdleTimerReset() regularly.



来源:https://stackoverflow.com/questions/2615985/keep-windows-mobile-6-phone-alive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!