Can you do this. For icons, you must have four images. They are
- Standard application icon
- Standard Transfusion Icon
- Standard icon with *
- Standard flip icon with *
After that use the following code
if (unReadChatMessages> 0) { appIcon = Bitmap.getBitmapResource("app_alert.png"); rolloverIcon = Bitmap.getBitmapResource("app_rollover_alert.png"); // turn on the LED if(LED.isSupported(LED.LED_TYPE_STATUS)) { LED.setState(LED.STATE_BLINKING); LED.setConfiguration(100, 1000, LED.BRIGHTNESS_100); } } else { // use default icons... appIcon = Bitmap.getBitmapResource("app.png"); rolloverIcon = Bitmap.getBitmapResource("app_rollover.png"); // Turn off LED... if(LED.isSupported(LED.LED_TYPE_STATUS)) { LED.setState(LED.STATE_OFF); } } // Try to set the icons HomeScreen.updateIcon(appIcon, 0); HomeScreen.setRolloverIcon(rolloverIcon, 0);
source share