Vibration and Pocket PC devices

A number of Pocket PC devices support Vibration as an alert method, most (but not all) are Phone Edition devices. The Vibrate class in the OpenNETCF.Notification library is specific to Smartphone devices only.

However the good news is that the Vibrate functionality is implemented as a notification Led so you can control the vibration using the Led class. One of the peculiarities of the NLed API is that the collection of Leds may contain gaps, for example some devices contain a notification Led at position 0 and a vibration device at position 5. There is no way to programmatically determine the index of the vibration device, you can only determine the overall count of devices. Also the vibration device can only be turned on or off so the Blink setting behaves exactly as On would.

On the HTC Himalaya the vibration device is implemented at index 1 and the following code can be used to turn on and off the vibration:-

OpenNETCF.Notification.Led l = new OpenNETCF.Notification.Led();

//turn on vibration

l.SetLedStatus(1, OpenNETCF.Notification.Led.LedState.On);

//turn off vibration

l.SetLedStatus(1, OpenNETCF.Notification.Led.LedState.Off);