Hi All
I'm
currently writing my diploma thesis and as
a part thereof i am writing a WM based application to constantly log
some data (various sensor input via Serial, picture capturing, audio
recording and GPS via Bluetooth) which will later on be used for some
data mining/context awareness stuff.
It is absolutely crucial
that i have a constant stream of incoming data that is not interrupted
by e.g. standby, be it system or user initiated...
And that is exactly where i am stuck now... :-(
Does anyone know how i can prevent my wm 2005 PPC device from going into standby, even if the user clicks on power off button
However, if this is possible, will the keys and the touchscreen still be locked (not a must, but would be nice)
(Btw.We are using the new Palm Treo 750v)
If
the above isn't possible, can i configure something (either
programmatically or via registry or wherever) to keep my application
running
Any help/input would be very much appreciated!
Thx a lot!

Prevent standby/keep app running in standby?
Vladimir Frizen
You can P/Invoke SystemIdleTimerReset() from time to time to reset standby timer. You data won't be collected for very long though as battery life would be ruined because of that.
You can also use CeRunAppAtTime() to launch your application periodically, e.g. every hour or so.
Of course if user clicked power button or removed battery device will go off and there’s nothing you can do except for instructing user not to do it.
J P R
-> http://www.sto-helit.de/modules/edito/content.php id=36
Thx again, Ilya for your tips! May be (or should I say probably ) i'll come back to you if we run into another problem... :-)
RoadGlide
The SystemIdleTimerReset() solution works for automatic standby, thats true... :-)
But since I have full control over the used device (Treo 750v) i can solve this by just deactivating automatic standby.
The bigger problem is if the user initializes stand by.
I could indeed instruct users not to press the power button, but since the power button is also used to lock keys and touchscreen, it will get kinda hard for the user to carry the phone... :-(
Is there really no way to keep an app up&running in standby or to completely disable standby (it doesn't really matter if it is a dirty hack...)
Since it is for academic research, battery life is not the biggest issue, as long as it survives a normal day...
Thx again!
THE RAZI
The idea of intercepting the hardware button was already internally discussed. :-)
If i intercept this button we get 2 new problems in exchange:
1. Handling a phone call gets pretty "unnatural".
2. We would have to lock the keys and touchscreen manually/programmatically...
(3. Acquiring HW Power Off/Hang Up Key doesn't seem to be possible if cprog.exe is running )
Concerning battery life: as long as the display is still turned of if not in use it seems to easily survive a normal day... :-) Good work there Palm! :-D
helsingfors
I can see you’ve got it all covered, I’ve nothing to add… Good luck with your development.
AndrewVos
You might try intercepting power button (search forums on how to handle a hardware buttons) but that might not be possible as it might be hardware supported functionality.
As to battery life, I doubt it would run for a day without standby.