Related
The application I'm developing needs the device to always remain on, even until the battery runs out, so I need to disable the auto power off feature if it has been enabled.
I've tried using
Code:
SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT,...);
but it just doesn't work. Returns success but nothing changes, not even the registry keys where the values are held. I found the registry settings in HKLM\System\CurrentControlSet\Control\Power\Timeouts, and played around with setting them, but they aren't picked up until a soft reset occurs which isn't a viable solution.
So the first thing I need to know is what the difference between the reg keys
HKLM\System\CCS\Control\Power\Timeouts\BattSuspendTimeout:dword
and
HKLM\System\CCS\Control\Power\BattPowerOff:dword
are.
They both seem to contain the same value, and similar names.
The second thing I need to know is what needs to be done to notify the system that the idle timeout has changed, and to reload the value from the registry. I tried an HWND_BROADCAST of WM_SETTINGCHANGED but to no avail. How does the system dialog where you can change the idle timeouts inform the system those values have changed??
Thanks,
Timbo.
Ok, here is the (Cell Tower ID) location based Sleep Management software (earlier called phone switcher).
Saves your battery and works automatically without any manual action once configured
Application is not memory resident so it does not keep running in the background. Does not write anything to registry etc so can be uninstalled cleanly.
Application can run in one of the following modes
• Flight Mode: System automatically switches to flight mode when you are at predefined location (Say Home) based on the time you setup. So when you are at home, say from 10:00 PM to morning 6:00 AM your phone is really sleeping so no one can call your mobile. But if you are not home, then phone remains ON even at night.
• Run Command*: You can configure separate command line applications while ‘entering’ and ‘exiting’ your Sleep Location. So if you want to perform some other actions such as enabling the sounds/vibrations/forwarding etc you need to configure this feature
Run Command* Notes:
• Run command has two settings
o Entering sleep locationo Exiting sleep location.• Either browse for the command line application or copy paste the short cuts on the file and any command line parameters
• Some programs require you to ‘Wake Up’ the device to run, so if needed use that option
• ‘Wait for completion’ is only for advanced configurations. Most of the time it will hang the application. So use if you absolutely need it.
• You can test your run commands from the ‘Test’ menu.
Update history
Update 1.0.3
• Bug Fixed : If you were out of sleep location and returned to sleep location after 12 mid night(with in the sleep period) application would skip the current sleep.
Update 1.0.2
• Better user friendly UI added
• Now the application supports running an external application on command line.
Update 1.0.1
• Multiple locations on the schedule: If you want to set more than one location as you 'Sleep Location' you can do it now.
• Now if you were not at home at set time, system will keep polling based on the poll time you specify. So as soon as you reach home your phone will be switched off.
• If you turned on your phone manually after the rk-Sleep set it to flight mode, then your phone remains on till next scheduled sleep session
It is working on Hermes(WM6), and I have tested it on WM5 emulators. Will NOT work on WM2003.
Setup Instructions:
• You need to be at ‘Sleep Location’ to setup the application.
• In the ‘Locations’ tab, the current location box shows some numbers corresponding to your location.
• Click the button ‘Set as Sleep location’ to add current location as your sleep location. You can add multiple locations as sleep locations.
• On the ‘Schedules’ tab configure the ‘From’ and ‘To’ time fields. (You need to specify time in military time format)
• From the tab ‘Action’ choose if you want to use flight mode or Run Command (you need to set up your enter and exit actions)
• Finally click ‘Enabled’ and click the ‘Save’ menu
That’s all now you are set for ‘Sleep’. You can safely exit rk-Sleep.
The status tab would show you the last action attempt log
Note: This application requires Compact Framework 2.0
You need compact framework 2.0 installed inorder to run this application. The compact framework is already part of WM6, so if your device is WM6 skip this step. But most of the WM5 devices do not have this update. So you must download here and run the installation on your desktop (then active sync to update your device). Only after completing this step install the application.
If you like the application please show your support by replies and or donation on paypal
Download from here
Update 1.0.1
Multiple location on the schedule: If you want to set more than one location as you 'Sleep Location' you can do it now. On the sleep location box bring the context menu up, and choose 'Append to location' now add the new location to the list. You can add any number of sleep locations!
Now if you were not at home at set time, system will keep polling based on the poll time you specify. So as soon as you reach home your phone will be switched off.
If you turned on your phone manually after the rk-Sleep set it to flight mode, then your phone remains on till next scheduled sleep session
Hello,
With this program there would be still another interesting option which one to insert could.
It would thus not have to be possible the flight mode to activate automatically with enters a stored potition dependent on the time.
If someone works in a hospital, he needs to store only the position and every time it is in the hospital the flight mode switched on.
That one could not do also at others locates to use at those handys permitted or desired is I thinks there also of cemeteries.
MfG
S64
Great idea!
Is it perhaps possible to tirgger an application (or better: mortscript) upon entering a given location?
(I use mortscript to change call profiles, by copying sound files to overwrite the soundfiles I assigned as ringtones for various contacts. So if I set a "work" profile, the ringtones for different people are overwritten with a soundfile that contains silence, while others are made more discrete. It would be great to be able to automate this!)
Jörg
Instead of enabling flight mode, why not just disabling sound or enabling vibrate only mode?
Thanks
V J said:
Great idea!
Is it perhaps possible to tirgger an application (or better: mortscript) upon entering a given location?
Jörg
Click to expand...
Click to collapse
Jörg,
I do not know about mortscripts, but if i make application to run some other exe(say with some command line, Will the mortscript be able to change sound settings, call forwarding etc?
tytnguy said:
... but if i make application to run some other exe(say with some command line, Will the mortscript be able to change sound settings, call forwarding etc?
Click to expand...
Click to collapse
Yes, it should be able to do that. Also, maybe it is better to write it this way, and have your "flight mode application" written as a seperate program to be triggered by your tower-based software. In this way, others can contribute to write any other programs (as plugins) to yours. Anyway, AFAIK, Mortscript can do most of the job and or VJ (not the one above) has some nice collection that you can paired with yours.
Next you can write some scheduling software that will run an application whenever there is a 'Busy' (e.g. meeting) in your schedule (e.g. activate vibrate only mode). Then, with your tower-based software and your scheduling software, you can have a nested tower-schedule, while others can have a bluetooth-pairing based (e.g. execute software when near a paired bt device - change mode when inside your car), then you can stack all these together that will schedule your stuff based on tower-schedule-bt pairing.. WOW... too much software engineering makes you crazy.
Very nice software, but pls if You can, make a addon to change profile based on id, that would be nice. Something like: when i go to work (cell id: XX) phone change profile to vibrate/silent, but when i go back to home phone (cell id:YY) will change profile to loud.
Thx
drivex said:
Very nice software, but pls if You can, make a addon to change profile based on id, that would be nice. Something like: when i go to work (cell id: XX) phone change profile to vibrate/silent, but when i go back to home phone (cell id:YY) will change profile to loud.
Thx
Click to expand...
Click to collapse
Yes I know that is where this software will lead to(Hopefully)
But to support multiple locations the progrma gets too complex. But I know that will be a perfect applicaton!
@VJ: I think using mortscript with the tool would defeat the purpose of the tool, because with mortscript you don't need the tool (The current tower, or BTS as I should refer to it to, is available in registry I think)
@tytnguy: kudos to you, great streak with so many useful programs.
Update 1.0.2
• Better user friendly UI added
• Now the application supports running an external application on command line.
• You can configure separate command line application while ‘entering’ and ‘exiting’ your Sleep Location
More info on the main thread.
Hi,
Great Application that seems to work perfectly. I can see myself using it to help save on battery life.. and also when I enter work where I cant have the phone on.
Don't suppose you'd share how you get the tower information? I tried a method posted on the forums but it doesn't work for me and only works when the data/voice is not connected.
I tried to implement this into an application I use as a backup to give a rough location if GPS location isnt available but never managed to read a sensible string for the towers ID.
(If you'd rather not say I understand fully)
Thanks,
sam
Great!, make a profile changer based on location also, that will be awesome
Update 1.0.3
• Bug Fixed : If you were out of sleep location and returned to sleep location after 12 mid night(with in the sleep period) application would skip the current sleep.
I LOVE it, actually I've been looking for something like this every since I switched from my Nokia communicator 9000
2 suggestions
1- would it be possible to "rename" locations to something more intuitive?
2- I'd like to be able to trigger an alarm on entering a location that way if u are on a train your phone can wake u up when you reach your destination
thanks
ArcticCat said:
I LOVE it, actually I've been looking for something like this every since I switched from my Nokia communicator 9000
2 suggestions
1- would it be possible to "rename" locations to something more intuitive?
2- I'd like to be able to trigger an alarm on entering a location that way if u are on a train your phone can wake u up when you reach your destination
thanks
Click to expand...
Click to collapse
Thanks for the reply,
But right now the application just supports one location, So you are not able to do multiple locations. If you use the slot of managing only alarms its fine. But if you want to do alarm and also in some other location some other action you can not.
But i have that featrue in my list though
To do it, right now you have to set to 'Run Mode' and in the run mode specify any media file, On entering your location the media will be played.
Hi tytnguy,
found a "mini minor" bug in latest version 1.0.3...
If you just append a new location and change nothin other
the Save function don't gets active and so if you just press
OK the new location won't saved and neither the window don't
pop up asking wether you want to save or not.
So you have always to tap any other function on/off additionally
to be able to save Hope you understand this
Next step in version profiles would be great
Best regards,
Olioaglio
Olioaglio said:
Hi tytnguy,
If you just append a new location and change nothin other
the Save function don't gets active and so if you just press
OK the new location won't saved and neither the window don't
pop up asking wether you want to save or not.
So you have always to tap any other function on/off additionally
to be able to save Hope you understand this
Olioaglio
Click to expand...
Click to collapse
Understood, For now to enable the save button you can Uncheck and Check the 'Enable' checkbox as you suggested
Olioaglio said:
Next step in version profiles would be great
Olioaglio
Click to expand...
Click to collapse
I know others also requested it, but what type of 'Profile' you are asking for? Is it changes the sound profiles to change between different sound modes? Or change lot of options such as sound+wifi+bluetooth+backlight+....etc?
tytnguy said:
Understood, For now to enable the save button you can Uncheck and Check the 'Enable' checkbox as you suggested
I know others also requested it, but what type of 'Profile' you are asking for? Is it changes the sound profiles to change between different sound modes? Or change lot of options such as sound+wifi+bluetooth+backlight+....etc?
Click to expand...
Click to collapse
I would like location based profiles with different schedule times,
so that you could e.g. install a "Home location" with flightmode from
11pm to 8am (like it is now) and a second profile maybe for work
with flightmode from 12am to 1pm. Or maybe a profile with 24/7 flightmode
on a certain location. Lets say you work in a hospital and while you
enter the lcation phone would turn to flightmode. If you leave phone would
switch on again.
The wifi+bluetooth+beam etc options would be also a geat thing to include
as an option with checkboxes, so one could save even more battery at night
and in sleep location would not be any electro smog.
But for now I can live very good with the program as the main function
works like it should now. One little thing: Found out, that if you reset the
phone within schedule time and phone was turned on (manually) rk-sleep
wont turn it off again. But this may be wanted as not to nag you if you
decide to manually turn on.
Olioaglio
What is the Net Compact framework that it needs! I'm running WM5, and it doesn't work on my device and I supose it has got something to do with what I mencioned earlier. Thanks.
Currently running Touch-IT 2.3 on my Wing. Just removed old versions of PocketCM (.15 and .16), installed .18 as well as Google Maps. Other than BatteryStatus, device is basically using only the standard programs that comes with Touch-IT.
I soft-resetted and now a battery icon appears in the top right corner of my today screen where the task manager button used to be. Clicking it brings up a "notification" window titled "Battery" with "Main", "Backup", and "Memory" and their relative percentages. When I click and hold it it comes up with a list (analog, percent + analog, percent + digital, memory + analog, detail). None of these gives me any indication of what program is doing this. I scoured my program settings (especially batterystatus) and can't seem to find what is doing this. Obviously not having quick task manager access is annoying, especially when the regular battery indicator is right next to this new icon.
Any ideas what program this might be or what setting might have been changed? Its more than possible that a friend playing with my phone checked some option box without me knowing it and the soft reset enabled it, I just can't find what it was!
Thanks
It sounds to me like you may have disabled your HTC Task Manager.
Go to Start, Settings, System, Task Manager
and under Button, make sure its Enabled.
You may also have something else installed that changes those icons, like wisbar or pocket plus that may be doing that... so make sure you dont have something else interfering.
Hey guys,
I just got my HD and have really no clue how to get the gsen to work so i can write sms and emails in landscape. Also I would like a few other applications to be in landscape too.
Can anyone help me??? It would be greatly appreciated.
Can someone please help me? or give me website that gives instructions? I really need help for this!!!!!!!!!!!!!!
gsen should by default enable landscape for almost any app (with some exceptions like tf3d and so on). after installed you should run gsen manually and then notice if the screen rotation is working. then if you like etc you can run gsen cfg and set it to autostart via left soft key.
crashDebug said:
gsen should by default enable landscape for almost any app (with some exceptions like tf3d and so on). after installed you should run gsen manually and then notice if the screen rotation is working. then if you like etc you can run gsen cfg and set it to autostart via left soft key.
Click to expand...
Click to collapse
Is it the best software for the HD to use for auto-rotation? Also how do i install it on the phone? thats my main problem. It seems to have come already pre-installed but cant figure out how to work it....
simply download the cab trasfer to phone and tap on it from the phone
OmZ said:
Is it the best software for the HD to use for auto-rotation? Also how do i install it on the phone? thats my main problem. It seems to have come already pre-installed but cant figure out how to work it....
Click to expand...
Click to collapse
Pre-installed?..... GSen doesn't come pre-installed.
Where did you get it from?
He's probably just talking about the original rotator that excludes most everything, aside from the media/internet based programs.
Works??
Hi again.
I installed the prog right now, started and open the settings. Screw the phone -< works fine. close settings, open programs, tur the phone again -> nothing happens. Like in nearly) every other program. Opening the settings again, nothing happens too.
So i turned the GSEN off an on again sometime, settings work but nothing else.
WHAT'S THE PROBLEM???
Thx for reply
Did you read the readme.txt file that came with gsen?
Works fine on my HD
Here is a part of the file:
1. Description
Auto-rotate screen on SOME devices with g-sensor.
Install GSen and run it.
If you run it again, program will ask you "Unload program?".
If you answer yes - program will be unloaded.
This also possible without question with parameter #unload.
You can use configuration shortcut for edit configuration file.
This file can include this command:
#window(text or class name) - add window description
#timeout(value) - default value 1000 ms
#onlyfor(0|1) - if 0 auto rotate work for all programm except defined by #window, otherwise ONLY for this program.
By default program not rotate screen if Manila or Teeter is foreground application, but you can edit this list.
#fdscreenoff(0|1|2) - if 1, program will switch off screen if you put device with screen on bottom, if 2 device will suspend.
#lockscreen(0|1) - if not present = 1, can prevent, if enabled, rotation with locked device
#poweroff180(0|1) - if not present = 0, determine interpretation of rotation to 180, 0 - rotate screen, 1 - power off.
GSen can indicate self state,
you can setup it with this commands:
#show(0|1) - if 1 GSen will show one pixel (by default) indicator on top bar.
#x(X),
#y(Y) coordinates of this indicator, default X=240,Y=1
#clr(R,G,B) - color, default white (255,255,255)
you also can setup width and height (#width(W), #height(H))
Commandline parameters:
#load - load app, if loaded already - exit without questions
#unload - unload app
#toggle - if loaded will unload, otherwise will load, usable with one shortcut
#about - show about window
if you start without parameters - program will ask "Unload?" if already exist one instance, or simple run if not exist.
NOTE: some programs, like Teeter game, cannot start in landscape mode, so switch to standard display orientation before.
Cheers
Yep
... I did.
First time I installed it I changed someting in the configfile as advised. But it doesn't work so in uninstalled and reinstalled it. Then started the prog.
SOMETIMES the picture turnes but not everytime.
I've got a HTC Touch Diamond :-o Shouldn't be the problem i guess...
Okay...
I just changed timeout to 5 and it works just fine on HTC touch HD
Guess it shoudn't be a problem on Diamond.
What is the Contacts program name?
In the GSen Configuration file, I want to be able to tell the program to leave the Contacts screen alone (to not rotate). The only problem I have is that I don't know the actual program name for Contacts, and where is it located?
Thanks,
Peter
Got it ...
I figured it out. When I entered the following command into the GSen configuration file:
#windows(Contacts)
It didn't work because I didn't first save it. Now that I've entered it again, and then saved the file, it works.
Peter
Is there any way to set it to rotate the Today screen? I'm using the default config and all programs rotate apart from Today.
Steeph said:
Did you read the readme.txt file that came with gsen?
Works fine on my HD
Here is a part of the file:
1. Description
Auto-rotate screen on SOME devices with g-sensor.
Install GSen and run it.
If you run it again, program will ask you "Unload program?".
If you answer yes - program will be unloaded.
This also possible without question with parameter #unload.
You can use configuration shortcut for edit configuration file.
This file can include this command:
#window(text or class name) - add window description
#timeout(value) - default value 1000 ms
#onlyfor(0|1) - if 0 auto rotate work for all programm except defined by #window, otherwise ONLY for this program.
By default program not rotate screen if Manila or Teeter is foreground application, but you can edit this list.
#fdscreenoff(0|1|2) - if 1, program will switch off screen if you put device with screen on bottom, if 2 device will suspend.
#lockscreen(0|1) - if not present = 1, can prevent, if enabled, rotation with locked device
#poweroff180(0|1) - if not present = 0, determine interpretation of rotation to 180, 0 - rotate screen, 1 - power off.
GSen can indicate self state,
you can setup it with this commands:
#show(0|1) - if 1 GSen will show one pixel (by default) indicator on top bar.
#x(X),
#y(Y) coordinates of this indicator, default X=240,Y=1
#clr(R,G,B) - color, default white (255,255,255)
you also can setup width and height (#width(W), #height(H))
Commandline parameters:
#load - load app, if loaded already - exit without questions
#unload - unload app
#toggle - if loaded will unload, otherwise will load, usable with one shortcut
#about - show about window
if you start without parameters - program will ask "Unload?" if already exist one instance, or simple run if not exist.
NOTE: some programs, like Teeter game, cannot start in landscape mode, so switch to standard display orientation before.
Cheers
Click to expand...
Click to collapse
i dont understand any of this talk.. if you go into the gsen edit screen, are those what will not rotate? eg, i would like to see the settings screen rotate, how do i add that? would it be something like #window(settings.exe)
Hello,
I am looking for an app to toggle my gps on/off. Can anyone help me with this?
I have the issue that when I have my phone in flight modus and am out of the country both GSM and GPS are disabled. I would like the GSM to be disabled in favor of GPS to be enabled. I wan't this option for my Tom Tom navigation when out of the country,so it does not get interrupted by phone calls or smsses.
Kind regards
http://www.freewarepocketpc.net/ppc-download-gps-toggle.html
Im also looking for a simple on/off toggle button for the gps.
Since you can have that in android i figure it should exist something similar created for wm.
I have only found wm homescreen plugins so far but since thats no use when you running manila or CHT it not even worth downloading.
Looks like ill have to keep searching....
p00ltergeist said:
Im also looking for a simple on/off toggle button for the gps.
Since you can have that in android i figure it should exist something similar created for wm.
I have only found wm homescreen plugins so far but since thats no use when you running manila or CHT it not even worth downloading.
Click to expand...
Click to collapse
You're right.
I'll test it under pure WM and check the registry while toggling on opr off : maybe I'll be able to detect what keys to change to get the same results directly, and possibly make a CHT widget.
Edit :
Found this one here :
http://wiki.modaco.com/index.php/Samsung_i600
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver]
"IsEnabled"=DWORD:00000001
-> change to 0 to toggle off ?
I'll check if it works... And if it actually saves battery life.
A Possible Work Around
I could not get the app from the link above to work on my HD2. It said it installed successfully, but I could find no exe or shortcut for it anywhere on my HD2. I searched a couple of app forums here and found nothing else.
Here is a possible solution although it is not a one-click solution like most toggles. It is based on this post:
http://forum.xda-developers.com/showthread.php?t=645916
Using a text editor, paste this into a new file:
30#ctlpnl.exe AGPSSettingsCPL.cpl - location services settings
Save the file with the name such as GPS Toggle.lnk (that's a small "L" in lnk).
Copy the shortcut file to the Windows/Start Menu/Programs folder. From there you can access it using the Start button/menu. Also, depending on the UI, you may be able to create a button on your main screen. I have Co0kie's Home Tab which provides the ability to create buttons on the home screen. (Co0kie's Home Tab has a number of toggle switches, but not one for GPS.)
This shortcut will bring up the Location screen from Settings. This may or may not be what you want. To be honest, I could not find a place that says "turn on/off GPS."
AGPS only allows to use available data network to update the satellites positions database in order to speed up satellites location.
It should have nothing to do with having the GPS receiver actually turned on or off...
In fact, it's turned off on my HD2, and I'm still able to use the GPS.
I'm currently trying to evaluate the effect the above registry value change has on battery lifetime...
Edit :
OK, at least your post put me on a track :
The registry tweak actually switches on or off the "Automatic GPS management" checkbox in the "Access" panel from the "External GPS" applet in WM "System" settings.
You can still use a shortcut as the one you posted, but it should contain 25#ctlpnl.exe cplmain.cpl,25,2 instead (GPS settings - Access).
Now the registry trick has strictly the same effect, and can be made out of a simple MortScript - then a CHT switch, too.
The only problem is I couldn't notice a better battery consumption, actually...