Notification LED in the DeviceEmulator V2.0 - How to customize the LED with a skin

DeviceEmulator 2.0 adds several new peripheral devices, including notification LED and vibrate.

If the emulator is running without a skin, or with a skin that predates the LED feature, then the emulator displays the LED as a blinking box in its title bar.  However, you can integrate it into the skin and make it look like a real LED.  The .zip file attached to this post contains a sample skin I put together - it is a PocketPC 2003 skin, updated so the power button blinks.

Behind the scenes, the LED is represented in the skin XML as a button, just like the buttons used to send keystrokes into the emulator.  The difference is that the LED contains an extra XML attribute:

isNotificationLED="true"

The "up" skin bitmap is used to display the LED in the ON setting.  The "down" skin bitmap is used to display the LED in the ON setting.  Note that skin buttons with isNotificationLED="true" are no longer buttons that can send keystrokes, so the onPressAndHold and onClick attributes are ignored.

 

pocketpc_2003_nled.zip

Comments