Fire up/control your apps @ Docking, PowerOn,Idle etc events - General Topics

Fire up and control your apps @ Docking, PowerOn or Idle events
This is W.I.P. and my goal is to get a clear overview
of what is possible with (standard/builtin) events in
windows ce.
EDIT: 28/03/06 - added correct event commands and examples
EDIT: 28/03/06 - added References and WM_APP
EDIT: 30/03/06 - added the QUIT message
References:
MSDN Wap Wakeup
MSDN WM_APP Notification
WM_APP and Window Class Name:
00008000 "WMP for Mobile Devices" (Windows Media Player)
00000400 "Inbox.MainWnd" (Outlook main window)
WM_APP findings:
Quit/Exit 00000010
quits a given window class Name. Example:
[HKLM\Software\Microsoft\Shell\Events\PowerOn\QuitWMP]
"On"=dword:00000010
"Class"="WMP for Mobile Devices"
On the Idle event that would be:
[HKLM\Software\Microsoft\Shell\Events\Idle\QuitWMP]
"Idle"=dword:00000010
"Class"="WMP for Mobile Devices"
Minimize 0000000?
....
Maximize 0000000?
....
Note: \....] stands for a choosen key name
Using only "Command=" you can start any application on a given event
PowerOn events:
[HKLM\Software\Microsoft\Shell\Events\PowerOn\....]
"command"="\somedir\someapp.exe"
Idle events:
[HKLM\Software\Microsoft\Shell\Events\Idle\....]
"command"="\somedir\someapp.exe"
[HKLM\System\CurrentControlSet\Control\Power\ActivityTimers\UserActivity]
"TimeOut"=dword:00000005 (5 secs)
Dock event:
[HKLM\Software\Microsoft\Shell\Event\Dock\....]
"command"="\somedir\someapp.exe"
You can even try this I think:
IncomingCall event:
[HKLM\Software\Microsoft\Shell\Event\IncomingCall]
[HKLM\Software\Microsoft\Shell\Event\IncomingCall\MyRingy]
"command"="wmp.exe \somedir\somemp3.mp3" (or .mid or whatever)
Customizing Event Actions
Note1: The Class string can be found using DotFred's TaskMgr 1.3
Discussion board
TaskMgr 1.3
Note2: The following dwords are commands. Dunno how to find them yet.
For every Event subkey you can use
"command"="someapp.exe arg1"
and also
"Class"="Window Class Name" (Window class name of active app)
"NotifyOnLaunch"=dword:00000001 (must be 1 to post message to the app window given in Class)
And a dword commando
The dword commando "ConnectMsg"=dword:00008004 is only used
in Event\CallConnect. If the same commando is used in Events\PowerOn
then it would be "On"=dword:00008004
The 8000 value is called the WP_APP is a constant for a application.
In Windows CE 8000 is used by WMP. The commando is WM_APP+X, where X is
an integer value. Sending 8004 to the WMP class window will pause WMP.
Sending 403 to Outlook (Inbox.MainWnd) wil do something in outlook.
(WM_APP for outlook is 400)
Dword Commando's (value 00000000 is cosmetic and not a valid commando):
[HKLM\Software\Microsoft\Shell\Events\PowerOn\....]
"On"=dword:00000000
[HKLM\Software\Microsoft\Shell\Events\Idle\....]
"Idle"=dword:00000000
[HKLM\Software\Microsoft\Shell\Event\CallConnect\....]
"ConnectMsg"=dword:00000000
"DisConnectMsg"=dword:00000000
[HKLM\Software\Microsoft\Shell\Event\Carkit\....]
"CarOnMsg"=dword:00000000
"CarOffMsg"=dword:00000000
[HKLM\Software\Microsoft\Shell\Event\Dock\....]
"DockMsg"=dword:00000000
"UnDockMsg"=dword:00000000
[HKLM\Software\Microsoft\Shell\Event\Headset\....]
"HeadOnMsg"=dword:00000000
"HeadOffMsg"=dword:00000000
[HKLM\Software\Microsoft\Shell\Event\IncomingCall\....]
"IncomingBegMsg"=dword:00000000
"IncomingEndMsg"=dword:00000000
[HKLM\Software\Microsoft\Shell\Event\SpeakerPhone\....]
"SpeakerOnMsg"=dword:00000000
"SpeakerOffMsg"=dword:00000000
Example for CallConnect and WMP:
[HKLM\Software\Microsoft\Shell\Event\CallConnect\Windows Media Player]
"Class"="WMP for Mobile Devices"
"ConnectMsg"=dword:00008004 (pause WMP)
"DisConnectMsg"=dword:00008005 (resume WMP)
Example for Dock and Outlook:
[HKLM\Software\Microsoft\Shell\Event\Dock\Inbox]
"Class"="Inbox.MainWnd"
"DockMsg"=dword:00000403 (command for Outlook?)
"NotifyOnLaunch"=dword:00000001 (Send DockMsg to Inbox.MainWnd)
"Command"="tmail.exe -RunInBKG" (run this when Docking)

hi I have no experience with this type of thing, as yet.
But would it be possible to route all audio through the car kit(whilst not on a call) with a command type thingy?
Thanks

Would be a tough one. I am still studying the potential of these events. The only thing I can think of is fire a command (you must figure that one out yourself) on the Carkit event.
HKLM\Software\Microsoft\Shell\Event\Carkit\RouteAudio]
"Command"="command to the exe file"
"Class"="the window clas name for that app"
"NotifyOnLaunch"=dword:00000001
"CarOnMsg"=dword:0000xxxx
"CarOffMsg"=dword:0000yyyy
where
xxxx = the message ID for switching audio to carkit
yyyy = the message ID for switching audio back
The message ID´s should be known to the maker of
the exe file you use.
Cheers
ps: doesn´t the device do it automaticaly?

pfff
Thanks but that went straight over my head :lol:

It would be great if TT sent it to the car kit automatically!

I can get a command to fire for a docking event, but i does not fire for an IncomingCall event. Do you know if only certain events support having a command fired.
Paul

Related

SNAPI (State Notification API)

Does someone perhaps know if anyone has integrated SNAPI (State Notification API) into his WM05 romI want to use a flash application that turns the himalaya into an thumb driven PPC (like an iPhone).
You need this SNAPI to make the connection with the flashprogram and several WM5 programs (like contacts etc., the VALUES subcommand can be passed any number of parameters and will return variables named identically to the parameters passed (assuming the values exist in Windows Mobile). In essence, the VALUES subcommand uses SNAPI to return SystemState values, as described by a developer)
Website for the development: http://www.whoneedsaniphone.com/ (also checkout the forum)

SKTools Update 4.4.5 released!

SKKV Software released SKTools 4.4.5 !
The winner of the Best Software Awards (Maintenance Utilities Category ) 2007,2006.
It is a well known fact that SKTools is rich in search features. These features are: search and replacement in the registry, in databases, in contacts, search in messages, search and replace on SIM card. These features have been considerably expanded in the new version – regular expressions are supported now, both for search and for replacement. For example, it is possible to find all files with the names starting with a certain set of letters and ending with a different particular set or containing a certain syllable in the name. It is possible to find keys consisting of more than N certain symbols in the registry. Also, it is possible to find all N-digit local numbers (without country and city codes) in contacts and on SIM card and to add the above codes to them. In addition, regular expressions are used in the new "bulk rename" tool.
News and updates:
"Files": new tool for bulk rename files from a template.
Regular expressions support (optional) for "Files", "Databases->Replace", "SIM Contacts->Replace", "Messages", "Registry search and replace".
Added new category "Last used", this category show 5 last used tools.
"Databases": CEVT_STREAM type (EDB) supported in the import/export option (as example "Notes" field in contacts).
"Storage Cards": ScanDisk tool (check and repairs logical FAT errors) shown percent of complete process.
"Storage Cards": shown file system type (FAT12/FAT16/FAT32) for cards.
"Storage Cards": call of Defragment tool is shown as "gray" if disabled in settings (in old versions this menu item is not shown if disabled).
Hard Reset command is shown as "gray" if disabled in the settings (in old versions this menu item is not shown if disabled).
Added "Skip storage cards" setting for "Temporary and Junk files" option.
This update is free for all registered SKTools 4.x users.

Hardware breakpoint w/IDA 5.2

I'm disassembling an application and would like to see how it fills a certain text field (in a list view). It displays the result as "X units", where X is a number and units indicates the units of the value. I disassembled the program in IDA and found the "units" string. To make sure the application uses this specific string (and not %d units, for example), i ran unsigner on the application and modified the string via a hex editor. Indeed, the string has changed in the appropriate place.
Using "jump to xref to x" on the "units" string, i found 5 places that use it - each by LDR'ing it to R1. I set breakpoints on all instances but, surprisingly, none were hit. I then tried to set a h/w breakpoint on the string by setting a breakpoint on:
.rdata:00022ED4 aUnits_0 unicode 0, < units>,0
and selecting "hardware breakpoint" but IDA does not allow this (OK button is greyed out and cannot select read/write/execute). I tried this with 5.2 and 5.3 demo on an HTC tytn ii.
Questions:
1) Can anyone think of a way the string is used but will not be seen as a reference to the string?
2) Why can't i set a h/w breakpoint?
3) Any other ideas?
Thanks

[Q] Searching Taskmanager with used CPU-Time

Hello,
I'am searching for a Taskmanager für Windows Mobile 6.1 which shows up the CPU-Time of processes.
I want to know which process is wasting the most CPU power over time.
As some tasks will close and restart, the most Taskmanagers will restart counting the CPU-Time. So a logfile would be nice.
Can somebody help me?
I'll help you out here
Hello there,
Follow this link to download a freeware Taskmanager capable of ;
Features:
- Process manager
- CPU usage (with CPU graph)
- Application Manager -=[ScreenShot]=-
- Service Manager -=[ScreenShot]=-
- Device Manager (only WM2005 and above) -=[ScreenShot]=-
- Windows Manager
- Notification Manager -=[ScreenShot]=-
- IP Config utility
- Ping utility
- Net Stats utility
- Registry Editor
- Run program utility Process manager:
- Allows to stop or kill a given process.
- Can activate the process if it has a window
- Can see details of a process (via context menu)
- modules (see exported functions)
- threads (can kill threads, change priority)
- windows (details, messages,...)​ CPU usage: - Shows CPU usage of each process.
- Shows CPU usage graph of the device. (Not process specific)
- Can close a process
Application Manager:
- Activate an application
- Close an application
- Close all applications
- Can see details of an application (via context menu)
Service Manager:
- Start/Stop service
- Set automatic or manual
- Enable/Disable
- Find service settings in registry
Device Manager: (only in WM2005 and above)
- Start/Stop device
- Set automatic or manual
- Find device settings in registry
Windows Manager:
- Shows a tree containing all existing windows
- Find a specific window via handle/title or class
- Highlight window if visible
- Activate, enable/disable, show/hide, close
- properties of a window (rectangles, styles, process,...)
- messages (v2.8)
- filtering messages mechanism
- custom messages can be added​ Notification manager:
- Shows the list of existing notifications
- Add/remove edit a notification
- remove duplicates and SCRIPT events
- enable/disable notifications
IP Config utility:
- IPConfig, IPConfig/all
- Renew/release, renew all/release all
- Adapters infos
Ping utility:
- ping ip address or hostname (w/o dns resolution)
- tracert ip address or hostname (w/o dns resolution)
Net Stats:
- Shows UDP/TCP table(w/o dns resolution)
- Shows IP/ICMP/TCP/UDP Stats
- Route table (w/o dns resolution)
- Wake On LAN
Registry editor:
- full registry edition capability
- import/export reg files (import Win2k and WinNT formats)
- favorites
- registry search functionality (returns all occurences found)
- cut/copy/paste functionalities
Run program utility:
- Allows to launch a program, a file or an url like in windows
- can add a file parameter and extra parameters
Command line parameters:
/cpuusage: begins with CPU Usage
/regedit: begins with the Registry Editor (a shortcut can be directly created from the options menu)
/windows: begins with the Windows Tab
/apps: begins with the Applications Tab
/ping: begins with the Ping Tab
/ipconfig: begins with the IPConfig Tab
/netstats: begins with the NetStats Tab
/services: begins with the Services Tab
/notifs: begins with the Notifications Tab
/devices: begins with the Devices Tab
/depends: begins with the Depends Tab
/about: begins with the About Tab
/r: reboots pocket pc without confirmation
/rq: ask confirmation before rebooting pocket pc
/tray: starts minimized to tray
/s: suspends pocket pc
/w: wakes the pocket pc if in suspend mode
/wl "xxx": wakes the pocket pc and launches program xxx
/wlq "xxx": wakes the pocket pc and ask confirmation before launching program xxx
/nr: reboots pocket pc at a specific time (a notification is created and every x hours, the pocket pc is rebooted.)
The syntax is /nr d:n with n= number of hours (eg.: /nr d:24)
/nd: removes notifications duplicates
/ns: removes SCRIPT:0x000 events
/nb: removes notifications duplicates and SCRIPT:0x000 events
/kill processname: kill a process given its name
/startsvc servicename: starts a service given its name (v2.8)
/stopsvc servicename: stops a service given its name (v2.8)
/u: used in conjonction with a .dll file in order to deregister it (v2.9)
/provxml filepath: install/process a provisioning xml file (v2.9)
/regxpkey [filepath] [[regkey]]: export registry key to file path, if no file path, default is created in \\My Documents.[] are mandatory for regkey. ex.: /regxpkey \\Storage Card\\Regfile.reg [HKEY_CURRENT_USER\\Software\\FdcSoft] (v3.1)
/regxpall [filepath]: export all registry to filepath, if no filepath provided, a default one is created under \My Documents (v2.9)
[filepath] /silent: used in conjonction with a .reg file or a .dll file, so no message box is shown (v2.9)
/notif [/s \"subject\"] [/b \"body\"] [/t 0-60] [/bt \"ok\"] [/hide] [/beep] [/wake] : this will show a bubble notification for a certain amount of time, if 0 is specified then time is infinite. A subject and a body can be specified. The button text can be changed, the notification can wake the device, if suspended. (v3.3)
/assocregext : associate the reg file extension to TaskMgr.(v3.3)
/createtmsh : create the shortcuts for TaskMgr.(v3.3)
/createregsh : create the shortcut for RegEdit.(v3.3)
/runwinstart : launch TaskMgr automatically when the device boots.(v3.3)
/hibernate: sends the WM_HIBERNATE message broadcastly.(v3.3)
/tapscreen x,y: simulates click at position x,y with [x,y] in screen coordinates(v3.3)
I know this helps, greets Senax

Freelance Android developer needed

I'm looking a freelance Android developer to help me out with a project. The concept is a predictive news article reader with the spec detailed below.
If you're interested please PM me with your expected timings and costs. Also if anyone can see any potential issues please feel free to pull my spec apart
Please post if you have any questions or like to know more details.
Regards,
Rhys
Requirements:
Preference is for Froyo or minimum necessary API to meet the requirements
Must be viewable on all screen sizes up to 1080
Initial activity to be a splash screen with a full resolution graphic:
If first run then:
Account Screen Activity with:
user input field for email_address
radio buttons for gender (Undisclosed, Male, Female)
radio buttons for age(Undisclosed, <17, 18-24, 25-34, 35-44, 45-54, 55-64, 65+)
"Complete" button to send details via PHP in the form of:
host/account_settings.php?email_address=$argv1&gender=$argv2&age=$argv3​user_id is returned from PHP and needs to be stored permanently​Refresh a JSON output from PHP in the form of:
host/list_view.php?user_id=$argv1&unread=1
where user_id is the locally stored user_id​Once refreshed start ListView Activity​
ListView Activity displaying the JSON output containing a 2 dimensional array with 20 articles long in the form:
{"article_id":["title","summary"]}
An Image also needs to be passed from AWS RDS or S3 via PHP, resizing will be done on the server. Fixed height dimensions required.
For Each ListView item:
Contain the image on the left
Title in bold on the top
Summary filling the rest of the space
Swipe left removes the item and calls the following PHP scrpit:
host/response.php?user_id=$argv1&article_id=$argv2&activity_id=1&response=-1​
Swipe right removes the item and calls the following PHP scrpit:
host/response.php?user_id=$argv1&article_id=$argv2&activity_id=1&response=1​
Pressing removes the item, opens the Article Activity and calls the following PHP script:
host/article.php?article_id=$argv1​
Once the number of articles remaining in the JSON array falls below the maximum number of items displayed on the screen then refresh the list_view:
host/list_view.php?user_id=$argv1&unread=$argv2​
Article Activity:
Directly pass all text from the result of the article.php script minimising encoding and decoding of text.
Three always visible buttons on the button of the screen of equal width spanning the available space:
"Less like this" calls PHP script and returns to the ListView Activity without refreshing:
host/repsonse.php?user_id=$argv1&article_id=$argv2&activity_id=2&response=-1​
"Neutral" calls PHP script and returns to the ListView Activity without refreshing:
host/repsonse.php?user_id=$argv1&article_id=$argv2&activity_id=2&response=0​
"More like this" calls PHP script and returns to the ListView Activity without refreshing:
host/repsonse.php?user_id=$argv1&article_id=$argv2&activity_id=2&response=1​
Menu Screen:
Display Account Screen Activity
only call account_settings.php if changes have been made​
Unread / Read Toggle switch
list_view.php $argv2 = 1 for unread and 0 for read​

Categories

Resources