One of the goals of the Mobile In The Hand library has always been to provide a consistent managed API regardless of which specific flavour of Windows Mobile device you are using. One example of this is using the Vibration feature used to alert the user. The APIs are completely different and so we have provided a simple managed API composing of just two static methods:-
You generally won’t want to vibrate the device for very long because it would be both annoying, and a battery drain. To avoid holding up your UI thread you can call the methods on a separate thread. Just remember you must call Stop() to turn off the vibration.
Another example of functionality which is implemented differently between touchscreen and non-touchscreen devices are Profiles. Standard Edition devices can feature a number of profiles for different scenarios, touch screen devices have just three – On, Vibrate only and Off. To retrieve all of the available profiles use the following code:-
foreach(string profile in InTheHand.WindowsMobile.Forms.MobileDevice.Profiles)
You can set the device profile using a call to SetProfile:-
The name of the currently selected profile is available from the CurrentProfile property:-