保留的Windows Mobile 6手机还活着 [英] Keep Windows Mobile 6 phone alive

查看:165
本文介绍了保留的Windows Mobile 6手机还活着的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Windows Mobile 6.1的Pocket PC(触摸屏)的应用程序。我知道,当一个掌上电脑屏幕关闭,它将进入待机模式和应用程序在后台几乎停止。我的应用程序不能做到这一点。它需要保持下去。所以我的问题是,我怎么能保持手机还活着(背光灯打开),直到我的应用程序呢?

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?

这方面的一个例子是视频流应用,如YouTube 。它使在手机上,而视频播放。

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

推荐答案

只要你的应用做一些事情(在一个循环或定时器),它是相对容易的,你需要:

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();
}



然后调用 SystemIdleTimerReset()定期。

这篇关于保留的Windows Mobile 6手机还活着的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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