Hanging Up and Locking keys when closing a Smartphones slide
SlideActions for HTC Windows Mobiles.
This is the home page for the SlideActions application written to extend the functionality of sliding Windows Mobile phones.
Originally written and developed to improve my HTC Dual Touch it can be customised to work with other Windows Mobile Professional 6 phones. It might run on WM5 or other versions of WM6 (especially if they have the compact Framework 2 installed), I don't know, I haven't any to test.
The application has been expanded in response to user requests and now integrates with the popular S2U2 application (see Advanced Configuration), and at the moment is changing rapidly in response to user feedback. If there's something you want to discuss there's a thread on the topic at XDA Developers.
Installation
- Download this CAB file and copy it to your phone, then open it in File Explorer. It will install the application and prepare your phone.
- Configure and start the application by finding it's icon in the Start - Programs menu.
A StartUp shortcut will also have been installed so the application will automatically restart with the phone.
The CAB file can be deleted after installation.
General Configuration
I use SlideActions with my phone set to answer calls on slide open. This is an option on the Advanced tab of Phone Settings (accessible through Start - Settings - Personal - Phone). Having sliding close hang up and lock as well was the entire inspiration for SlideActions.
Slideactions four configuration tabs
On Close
The actions, if selected, which occur when the phone is slid close.
- End call: If checked any active calls will be hung up when the slide closes. Currently SlideActions hangs up by issuing an End Key press. Exactly what this does is handled elsewhere on the phone, by default on Dual Touchs that's a beep and return to the homescreen.
- End data connection: If checked any active data calls will be closed when the slide closes.
- Over-rideable delay before: The number of seconds delay before the following actions occur on slide close, unless user activity occurs to over-ride the actions. Currently the only user actions supported are screen touches and not button presses. Very quick taps may not be noticed (not my fault, it just seems the message doesn't get through the event system for light taps sometimes).
- Show today: If checked SlideActions will bring the Today window to the front on close.
- Lock keys: If checked the the phone will be key locked on slide close.
- Sleep: If checked the the phone will be put to sleep on slide close. Currently Slideactions does this by faking a tap on the power button, so a phone otherwise configured may do something else.
Re/Start starts (or re-starts to pick up a new configuration) the slide monitoring application and exists the Configuration. Stop/Exit stops any monitoring and exits the configuration.
On Open
The actions, if selected, which occur when the phone is slid open.
- Unlock keys: The HTC Dual Touch automatically unlocks keys on slide open - but sometimes it doesn't (I suspect a timing issue when phones are sleeping). And just in case anyone gets this to work on another phone it may be that it's neccessary for SlideActions to have this option, if missing on the phone. If checked Slideactions will attempt to ensure it unlocks on slide open as this is not otherwise reliable (or if used on a phone other than a Dual Touch perhaps missing altogether). On Dual Touchs it shouldn't really be used because it tends to issue errant left-soft key presses - it's a work in progress, use with care, DO NOT USE with 'Show unread messages' as it may delete unread messages!
- Show unread messages: If checked Slideactions will open the SMS application if there are undread messages.
- If on today window... If the phone is on the Today wndow when it opens it can be set to go immediately to it's Phone Dialer, Quick Menu or neither.
Other
Actions not related to sliding.
- Lock keys while in call: If checked Slideactions will lock the keys during phone calls to prevent errant actions.
Advanced
Interaction with other applications.
Users who may use a third party locking application, such as S2U2, or have a reason to invoke another application, can specify applications for SlideActions to show and hide.
Select from the dropdown list, or type into the field, the applications executable file name and 'Add' it to the list of third party applications to invoke (in Windows Mobile an executables name looks something like this: "\Program Files\S2U2\S2U2.exe").
Select an added application, enter any parameters required when running it, then an event. For the selected event choose what will happen by checking the appropriate option.
The defaults set when an application is added are Run On Close and Hide On Open - the settings a third party lock program would use.
Attempts to Run will iterate through the running applications and if a window associated with the file can be found it will be brought to the foreground, activating the application. If no such window can be found the application will be executed (with any supplied arguments).
Attempts to Hide will search for an associated window to be pushed into the background, activating the next window/application in order.
Attempts to Close currently Kill the windows process (it isn't subtle).
There is no gaurantee that any given application will play nice with this technique. It works fine with S2U2 on my phone (I leave Lock keys unchecked - that becomes S2U2s job), which is set to answer calls on slide open - if your phone doesn't answer on slide open you may find a clash of applications occurs preventing you from answering calls. It'll require trial and error with any other application.
Donations welcome
Because someone graciously asked after donating, here's a link to Paypal...
Please alert me to any bugs, problems, feature requests or other issues.
Advanced Configuration
Released Versions
- 12 Jun 2008, v1.9 - Small changes attempting to improve Unlock on Open.
- 11 Jun 2008, v1.8 - Upgraded Advanced Options, substantially refactored code.
- 6 Jun 2008, v1.7 - Improved, Internationzalized Unlock functionality.
- 1 Jun 2008, v1.63 - Added options to control behaviour on opening on Today window.
- 1 Jun 2008, v1.62 - Added Stop/Exit option, no other changes except inevitable tweak to Unlock.
- 12 Apr 2008, v1.61x - Experimental adjustment to unlocking code.
- 11 Apr 2008, v1.6 - Added In call Advanced option, and new Unlock code.
- 29 Mar 2008, v1.5 - New Configuration U.I. Added Sleep and over-rideable delays.
- 27 Feb 2008, v1.41 - New Keylock Unlocking code, hopefully reliably ensuring phones unlock on slide open if "Unlock on open" is selected.
- 20 Feb 2008, v1.4x - Experimental key unlocking code to correct occasional failure to unlock on slide open.
- 3 Feb 2008, v1.33 - Rolled back a change that proved problematic in certain circumstances.
- 30 Jan 2008, v1.32 - Small tweaks to improve reliability of existing functionality.
- 30 Jan 2008, v1.31 - Refined Off Hook detection.
- 30 Jan 2008, v1.3 - Code refactored to decrease resource consumption, added lock delay and unlock on open options.
- 29 Jan 2008, v1.22 - Various improvements, no new features.
- 27 Jan 2008, v1.21 - Added close data calls, improved detection of active calls.
- 26 Jan 2008, v1.2 - Removed separate S2U2 options and code, S2U2 invoking should now use Advanced Configuration.
- 26 Jan 2008, v1.11 - Added drop down list of executables for advanced configuration.
- 26 Jan 2008, v1.1 - Substantial code refactoring, added Today option, GUI for setting advanced options.
- 24 Jan 2008, v1.04 - Improved In Call functionality, added advanced options.
- 24 Jan 2008, v1.03 - Improved S2U2 integration, ought work from Storage Cards now; Tweaked In call lock to only happen once per call.
- 23 Jan 2008, v1.02a - Rolled back some S2U2 integration that caused odd screen blanking behaviour*.
- 23 Jan 2008, v1.02 - Improved S2U2 integration; Added In call lock option; Hang up only if call in progress.
- 22 Jan 2008, v1.01 - Improved internationalization and error handling.
*Turns out this was just an artifact of my working in a developement environment and was probably never an issue for users.
Details
The application is a C# .Net CF2 console application named Slidemon.exe and it is configured by SlideActions.exe
Both applications are installed in "\Program Files\SlideActions", a shortcut to SlideActions should be installed in "\Windows\Start Menu" and a shortcut to Slidemon should be installed in "\Windows\StartUp".
Application settings are stored in "\HKEY_CURRENT_USER\Software\Ionwerks\SlideActions".
Movement of the slide is monitored by checking the registry key specified in the application settings "NotificationKey" amd "NotificationValue".
If the phone is not a HTC Dual Touch it may be possible to find another key that allows it to work, I do not currently know about any as I've only worked on my own phone.
Other Phones
SlideActions looks for registry notifications of the slide being opened or closed. On the HTC Dual Touch this is the key "HKEY_LOCAL_MACHINE\Software\OEM\Keyboard DWORD:SlidingOut".
Other HTC phones may work exactly the same way, I have no idea as I've no others to test with.
If anyone wants to try and make SlideActions work on another phone, possibly even another brand, where it doesn't yet, the first step is to locate a notification key for the slide position.
I used RegLogger to monitor changes in the registry while sliding my phone.
If a different notification key can be found configure Slideactions to use it by changing the values in:
- \HKEY_CURRENT_USER\Software\Ionwerks\SlideActions STRING:NotificationKey
- \HKEY_CURRENT_USER\Software\Ionwerks\SlideActions STRING:NotificationValue