Posts tagged ‘CodeProject’

Windows Mobile: Kiosk Mode Series, part 2

In the first part of this series I showed how to make your compact framework application full screen or remove the Start icon from the menu bar. Now we will take a look at the task bar.

The task bar is at the top of your screen (except for fullscreen applications) and shows valuable information like the connection status, battery status or the current time.

Not full screen, taskbar not locked

This is a kiosk mode risk. The user is able to click the symbols in the taskbar and gets a popup menu with some icons. These icons enable the user to change connection settings, power management settings and others. You propably do not want to allow the user to make changes to some or all of the possible changes.

For example, clicking on the phone or signal strength icon will bring up this dialog:

The user can then change connection settings and activate or deactivate radios. Possibly a source for a bunch of support calls, if the user accidently changes connection settings.

Continue reading ‘Windows Mobile: Kiosk Mode Series, part 2’ »

KeyToggleStart: Yet another usage for keyboard hook

Hello Windows Mobile Users

recently the following was requested:

How can I start an application by just hitting some keys in sequence?

The answer: Just use a keyboard hook.

So I started to code this hook tool based on my KeyToggleBoot2 code. There was not too much to change. The new tool is called KeyToggleStart and it is configured by the registry:

            REGEDIT4

            [HKEY_LOCAL_MACHINE\Software\Intermec\KeyToggleStart]
            "ForbiddenKeys"=hex:\
                  72 73 00
            ;max 10 keys!
            "KeySeq"="123"
            "Timeout"=dword:00000003
            "LEDid"=dword:00000001
            "Exe"="\\Windows\\iexplore.exe"
            "Arg"=""

Reg keys meaning:

Forbiddenkeys is just an addon feature: key codes entered in this list will not be processed any more by your Windows Mobile device. For example, to disable the use of the F3(VK_TTALK) and F4 (VK_TEND) keys you have to enter a binary list of 0x72,0x73,0x00 (the zero is needed to terminate the list).

KeySeq list the char sequence you want to use to start an application. For example if this is the string “123”, everytime you enter 123 in sequence within the given time, the application defined will be started.

TimeOut is the time in seconds you have to enter the sequence. So do not use a long key sequence as “starteiexplorenow” and a short timeout (except you are a very fast type writer). The timeout is started with the first char matching and ends after the time or when you enter a non-matching char of the sequence.

With LEDid you can specify a LED index number. LED’s on Windows Mobile are controlled by an index number, each LED has one or more ID assigned to it. So, with LEDid you can control, which LED will lit, when the matching process is running. You can even find an ID to control a vibration motor, if your Windows Mobile device is equipped with one.

The Exe registry string value is used to specify which application will be started when the key sequence is matched.

If the application you want have to be started needs some arguments, you can enter these using the Arg registry value.

When you start the KeyToggleStart tool, you will not see any window except for a notification symbol on your Start/Home screen of the device.

If you tap this icon (redirection sign) you have the chance to end the hook tool.

Continue reading ‘KeyToggleStart: Yet another usage for keyboard hook’ »

WordPress CodeprojectFeeder Plugin updated

Hi

I just updated my CodeProjectFeeder WordPress plugin.

I did the code change requested by WebBiscuit at the Technical Blog mirror at CodeProject

have fun

josef

Mobile Development – Shake that thing

Hello Readers

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

[image SensorScan5_0102.gif]


[image SensorScan5_0304.gif]
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 not found]):


[image vectors.gif]

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’ »