Hello,

I have an media player application that comes up at certain time and play
mp3 file. I use SystemIdleTimerReset to prevent the Treo from going to
suspend mode. It works find if the KeyGuard is not Active. However, if the
application starts from sleep mode and the Keyaguard mode is on, then
SystemIdleTimerReset does not work and the device suspend after specific
time.

Can someone shed some light on this problem and what is the work around? I
know there must be a way because Active sync does ot and prevents the device
from suspending.even the keyguard is on.


Your help is greatly appreciated...

RE: Treo w700 Power Managment by KevinFL

KevinFL
Thu Apr 13 07:03:01 CDT 2006

Sam -

I am running into the exact same situation, did you ever get anything
figured out with this?

"Sam" wrote:

> Hello,
>
> I have an media player application that comes up at certain time and play
> mp3 file. I use SystemIdleTimerReset to prevent the Treo from going to
> suspend mode. It works find if the KeyGuard is not Active. However, if the
> application starts from sleep mode and the Keyaguard mode is on, then
> SystemIdleTimerReset does not work and the device suspend after specific
> time.
>
> Can someone shed some light on this problem and what is the work around? I
> know there must be a way because Active sync does ot and prevents the device
> from suspending.even the keyguard is on.
>
>
> Your help is greatly appreciated...
>
>
>

Re: Treo w700 Power Managment by Yaroslav

Yaroslav
Thu Apr 13 08:15:23 CDT 2006

There are two events that can suspend your Pocket PC:
1. Idle timer timeout. You need to call SystemIdleTimerReset often enough to
prevent device from suspending.
2. Power button. Resetting the idle timer does not prevent device from
suspending when user clicks a power button (or when it is done
programatically). To prevent device from suspending in this case you need to
enter the unattended mode:
PowerPolicyNotify(PPN_UNATTENDEDMODE, TRUE);

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com


"Kevin FL" <KevinFL@discussions.microsoft.com> wrote in message
news:B45167A5-83ED-44F5-B628-6A93CA5E1E77@microsoft.com...
> Sam -
>
> I am running into the exact same situation, did you ever get anything
> figured out with this?
>
> "Sam" wrote:
>
>> Hello,
>>
>> I have an media player application that comes up at certain time and play
>> mp3 file. I use SystemIdleTimerReset to prevent the Treo from going to
>> suspend mode. It works find if the KeyGuard is not Active. However, if
>> the
>> application starts from sleep mode and the Keyaguard mode is on, then
>> SystemIdleTimerReset does not work and the device suspend after specific
>> time.
>>
>> Can someone shed some light on this problem and what is the work around?
>> I
>> know there must be a way because Active sync does ot and prevents the
>> device
>> from suspending.even the keyguard is on.
>>
>>
>> Your help is greatly appreciated...
>>
>>
>>



Re: Treo w700 Power Managment by riki

riki
Fri Apr 14 01:30:59 CDT 2006

Kevin FL wrote:
> Sam -
>
> I am running into the exact same situation, did you ever get anything
> figured out with this?


try:

SetPowerRequirement()
(especially with device "BKL1:"

SetSystemPowerState()
might also do what your after.

riki

----
When asked if I am ignorant or apathetic I answer, "I don't know and I
really don't care."
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
Latest Betas have WM5 layout and speed dial support

Re: Treo w700 Power Managment by KevinFL

KevinFL
Wed Apr 19 16:14:01 CDT 2006

Thank you Yaroslave -

The "SystemIdleTimerReset" was my original solution and this seemed to work
fine on most devices, but get's ignored on the Treo w/ the keyguard on...

When I implemented the PowerPolicyNotify in your second suggestion, this
appeared to keep my device from going back to sleep

Thanks again!

"Yaroslav Goncharov" wrote:

> There are two events that can suspend your Pocket PC:
> 1. Idle timer timeout. You need to call SystemIdleTimerReset often enough to
> prevent device from suspending.
> 2. Power button. Resetting the idle timer does not prevent device from
> suspending when user clicks a power button (or when it is done
> programatically). To prevent device from suspending in this case you need to
> enter the unattended mode:
> PowerPolicyNotify(PPN_UNATTENDEDMODE, TRUE);
>
> --
> Yaroslav Goncharov
> Spb Software House, http://spbsoftwarehouse.com
> Pocket PC Developer Network, http://pocketpcdn.com
>
>
> "Kevin FL" <KevinFL@discussions.microsoft.com> wrote in message
> news:B45167A5-83ED-44F5-B628-6A93CA5E1E77@microsoft.com...
> > Sam -
> >
> > I am running into the exact same situation, did you ever get anything
> > figured out with this?
> >
> > "Sam" wrote:
> >
> >> Hello,
> >>
> >> I have an media player application that comes up at certain time and play
> >> mp3 file. I use SystemIdleTimerReset to prevent the Treo from going to
> >> suspend mode. It works find if the KeyGuard is not Active. However, if
> >> the
> >> application starts from sleep mode and the Keyaguard mode is on, then
> >> SystemIdleTimerReset does not work and the device suspend after specific
> >> time.
> >>
> >> Can someone shed some light on this problem and what is the work around?
> >> I
> >> know there must be a way because Active sync does ot and prevents the
> >> device
> >> from suspending.even the keyguard is on.
> >>
> >>
> >> Your help is greatly appreciated...
> >>
> >>
> >>
>
>
>