Some questions wrt. power management - Windows Mobile Development and Hacking General

Hi,
just two quick questions:
1.) How can I disable suspend mode? (The application which uses GPS and GPRS shall continuously run - no suspend even in battery mode)
2.) How can I programmatically power down the device (no suspend, a real switching off, the same as if the hardware button is being hold for a few seconds).
I'm working on the ARTEMIS device, Windows Mobile 5.0 and I'm programming in native c++ (Visual Studio 2005)
Thanks and cheers,
Günther

Sorry I do not remember the exact name but there is an API called SetPowerRequirment (if I am not mistaking)
Calling it for BKL1 device will stop backlight from shutting down and I believe suspend mode with it.
Unfortunately I do not have the answer for your second question.

Related

Detect Power On/Off Programatically

Does anybody know how to detect that the power on the device has been
turned off and then turned on programatically in C++.
I would like to know how long it has been off, when it is back on.
RTFM. CeRunAppAtEvent
way number two
periodically check GetSystemPowerState(...)
#3, I've used the EV_POWER event on a comm port.
Thanks for the replies. I've solved my problem by adding some times to
the OnActivate function of the main window. If modals are active the same
code needed to be added to the OnActivate function of the modal.
Thanks again
Tony

GPS module off when display off/sleep mode

Hi everyone,
my Trinity (running very well on WM6 with latest radio ROM) interrupts any GPS logging whenever I press the power button shortly to switch off the display (which I want to do for a) power saving and b) touchscreen locking). I tried several GPS (gpsinfo, tgps etc.) applications, they all lost GPS contact and stopped logging as soon as I did the above.
Is there any way to make the Trinity still run the GPS application while switching off the display and locking the touch screen?
My goal is to be able to keep the device in my pocket while logging my track with the GPS application.
TrinityGen
Perhaps, this tool can fix your problem
http://www.freewarepocketpc.net/ppc-download-psshutxp.html
You need a tool, that can switch off only the display while youre PDA is working...

Turning off screen shuts down GPS

I have a problem with my Touch HD in the way that everytime the screen shuts down the GPS seems to shut down. Regardless if I Push the power button or if I let it shut down by itself.
For example if I'm recording a track it will make a straight line from the point where the screen shuts down to the point where I turn it on.
I'm using Garmin Mobile XT and Kartex (a software from the Swedish lantmäteriet).
Have been using both softwares on my old E-ten Glofiish X800 and it worked fine.
/ Magnus
I think the problem is that its not the screen that turns off, but your device is going into suspend mode.
You will need an application which prevents the suspend mode and turns just the display off.
Is there a way to keep the GPS on in suspend mode?
Is there a way to change the registry so the GPS would not shut down in suspend mode? If not, what application would you recommend to use to only turn of display but not put the device in the suspend mode?
PoGa
poga said:
Is there a way to change the registry so the GPS would not shut down in suspend mode? If not, what application would you recommend to use to only turn of display but not put the device in the suspend mode?
Click to expand...
Click to collapse
Install MobileMagic from here,
http://forum.xda-developers.com/showthread.php?t=449654
On the options tab, choose GPS while power off.
I was just about to suggest the same thing. Mobile Magic allow for GPS to work while in suspended mode. There is even a feature that automatically calls upon what ever GPS app you have to start automatically when GPS signals are detected. Pretty cool not to mention a slue of other features this nifty app has.
Thanks gadgetuk437 and band27! Great app although a little bit too "robust" as I don't need the screen rotation & all other features. I guess I will only start it when I need to use GPS.
PoGa
I am in the same boat using GPS Watch which provides a track which can be outputted to Google Earth
Is there a registry hack that will allow the GPS to continue to be operated when powered off?
Thanks
Thank you gadgetuk437 and band27 for your advice but I don´t seem to get MobileMagic to work.
I have installed it and I have choosen autostart, start hidden and GPS power when power off. Have done nothing else.
MobileMagic autostarts hidden but doesn't prevent the GPS from turning off.
I have been using screenoff but that app doesn't really work either.
I raised the question at HTC as well and got the answer that this is something that is done by design in order to reduce the battery consumption.
I just don't understand why, If I didn't want to waste power I would of course close the GPS app before i turning of the screen.
Yeah, same here. After some testing I realized Mobilemagic's function doesn't really work. Even thought I also have the function to keep the GPS on selected my Garmin Mobile XT still looses the GPS fix as soon as the device goes into standby
PoGa
I'm away to do the same...
I have Garmin Mobile XT with the Snowranger map sets for tracking my snowboarding runs. I also want to leave the phone in my pocket all day and track where I've been!
I tried it a couple of weeks ago with my Diamond whilst running. I had the music player running and Garmin tracking me - and it kept my log file (which I imported to google earth) over my whole 45min run.

Power consumption, Suspend vs. ScreenOff

Hi all,
Can anyone shed some light on this question? How does power consumption differ between always suspend the UNI versus always ScreenOff the UNI, is there a big difference?
P.S. ( Does any one know how to make the middle button become the power on/off button? I tried AEPlus Button and it cannot remap the power switch)
Thanks!!!
During suspend mode, most of the non-essential hardware is turned off (e.g. SD Card is unmounted, Screen off, CPU is under-clocked @ 104 MHz etc.) This mode can be compared with PC S3 mode. In this mode, with all radios off, my device loses max. 3% battery per day.
In screen-off mode, all the hardware except the screen is running (at full speed) and consuming the battery is a matter of hours.
My question is why would you need the screen-of mode? Unless you're using an application which really needs that, my advice is to use suspend if you don't want to charge your device more than once per day.
GNotten
Thanks for the reply. I now confirmed that by actual testing too, and u were 100% right.
P.S. I wanna use screen off mainly b/c I wanna use the middle Enter button to turn on or off the phone. like a iphone style. So the best i can do is to map enter key to control backlight. While it can suspend the device, but it cannot wake the device from suspend since for Uni, i guess the middle Enter key and the navigations keys are not considered as "hardware keys" so i cannot map them to reactive the device.
Thats why I wanna know how to map the enter key as power switch as well.
hope someone knows the way, if there is any.

[Q] Power button failure (alternative approaches)

Hi guys,
I'm experiencing some failures of power button of my HTC HD mini: it sometimes does not power on my phone and I have to press it several time before it reacts...
As I do not want to buy a new phone, I'm exploring some alternative approaches to power on my phone (power off is not a problem as I can use some application to power it off).
Approach 1
I'm using G-trigger which has a power on feature which may configured to any phone shake and which works even when the phone is in stand-by.
That works properly but the problem is that querying the G-sensor lead to a fast battery drain, hence this solution is actually an extreme solution that I may use only with some enhancements…
Approach 1a
I tried to work of G-trigger service in two ways:
a. By night: I configured a profile disabling the G-trigger service by night and re-enabling it in the morning
b. When in stand-by: I tried to disable the G-trigger service when in stand-by and re-enabling it when the screen turns on again. Anyway I didn’t figure out how to understand when the screen is on (I tried by mortscript here http://forum.xda-developers.com/showthread.php?t=1296958 but no success). Any idea??
Approach 2
I would try to use some of the volume button but I have no idea about: is there a way to trigger some program when the volume button is pressed when the phone is in stand-by
In conclusion, I don’t know how to proceed and I will appreciate any idea or suggestion.
Thanks in advance

Categories

Resources