Some times ago I posted my remote cpu usage monitor. Now here is a similar tool but for logging the memory. You can now watch the memory usage of processes remotely for example when you test an application.
There are two tools: vmUsage and vmUsageRecvr. You may use the mobile vmUsage alone and just use its logging. The other tool receives the memory status information on a PC and enables long time logging and export to a csv text.
Continue reading ‘Windows Mobile: watch the memory footstep of running processes’ »
cpumon2 and cpumonRcv
Although this project is not yet finished, the main function works very well: viewing cpu usage remotely and capture data to database for later analysis.
Some of the ideas and code is inspired by a cpu usage article at http://www.codeproject.com/Articles/159461/Mobile-Processor-Usage. Further on I got more questions the last days like “Why is app x running slow?” or “When I start that app, the system gets slow and taskmanager shows a high cpu usage.”.
Here are two tools to capture cpu usage of a windows mobile device remotely via a TCP/IP connection.
Before you read on, the code is by far not perfect and there are still many improvements possible. But if you need a working remote cpumon, here we go…
Continue reading ‘Mobile Development: A remote cpu monitor and cpu usage analysis’ »
it has been a long time since my last post, I was a little bit busy.
This time I want to present some experimental code to visualize and analyze G-Sensor data. The goal was to achieve a shake detection algorithm. Unfortunately the device under test only provided 1 sample per second and that is not enough for a good shake detection. Beside that the code and classes developed may help you to find your way and they help you at last to determine the current orientation of the device.
left shows general information taken from vector, right shows a log with last vector data
left shows graphical of vector and force (length), right shows indicators for detected events
A g-sensor or accelerometer sensor normally gives you the x, y and z-values of a vector. A vector is an imaginary arrow with a direction and length starting from the three dimensional point 0,0,0. The vector direction points to the acceleration of the device. The normal acceleration on earth is 9,81m/s^2. If the device is on the desk, the y-acceleration is about minus 9.81m/s^2. The absolute value of the sensor may vary on the sensor and maybe defined as 1.0 for -9.81m/s^2 or -0.981. If you through the device up to the air, the x,y and z-values will reach 0,0,0 as if the device is weightless. Keep in mind that the acceleration towards the middle of the earth is always there and the device will come back to you.
Here is another visualization of the vector and a device (done with visual python, DOWNLOAD:vectors.py - (Hits: 329, size: 570 bytes)):
The device is facing upwards (see y arrow) with the top facing to you (the z arrow). The left side of the device is pointing to the right (the x arrow).
The light green/blue and the yellow arrows demonstrate two different vectors which show the direction (the xyz angles) and the force (the vector lengths) to the device.
Continue reading ‘Mobile Development – Shake that thing’ »
here is one other way to write a kios mode .NET application using a technique called SubClassing. The idea was born by a comment of redwolf2222 on this blog about how to Hide Start and Close buttons on Windows Mobile 6.5 devices. Redwolf2222 also provided a code snippet. Unfortunately it was incomplete and so I wrote my own class.
Disable clicks on Start and Close button
The demo project shows one dialog with two check boxes and you can easily test the function. If “StartButton Disabled” or “Close Button disabled” is checked, you cannot ‘click’ the corresponding button any more:
You still ‘click’ the buttons but the subclassed window will not ‘execute’ your click. The buttons are part of the toolbar32 window which is a child of the menu_worker window. So first we have to follow the window tree.
Find the right window
/// SubClassing: Install the wndproc hook
private bool hookWindow()
IntPtr hWndTaskbar = FindWindow("HHTaskbar", IntPtr.Zero);
if (hWndTaskbar == IntPtr.Zero)
//enable the taskbar, not realy necessary
if (oldWndProc == IntPtr.Zero)
//find the menu_worker window
IntPtr hwndMenu_Worker = FindWindow("menu_worker", IntPtr.Zero);
if (hwndMenu_Worker != IntPtr.Zero)
//get the child window which has the buttons on it
IntPtr hwndToolbar = GetWindow(hwndMenu_Worker, GetWindow_Cmd.GW_CHILD);
if (hwndToolbar != IntPtr.Zero)
_mHwnd = hwndToolbar; //store to remember
SubclassHWnd(hwndToolbar); //subclass the wndproc
Now, as we have the window handle, the subclassing can be started:
Continue reading ‘Mobile Development: Disable Windows Mobile 6.5 Start and Close Button’ »