Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Alert a BlackBerry smartphone user from a Background application

by Retired on ‎02-12-2010 03:11 PM - edited on ‎01-28-2011 11:40 AM by Retired (8,247 Views)

Summary

 

This article applies to BlackBerry® smartphones based on Java® technology.

 


Description

 

In situations where a BlackBerry smartphone application needs to present graphical alerts or information to the BlackBerry smartphone user, it will extend UiApplication. By extending UiApplication, the application will also be shown in the list of applications in the task switch screen.

 

If the background application does not contain any screens that you want to be shown in the task switch screen and yet want to display information to the BlackBerry smartphone user, the following method will display a global status screen from a background application that extends Application.

 

 

synchronized(
Application.getEventLock()){
UiEngine ui = Ui.getUiEngine();
Screen screen = new Dialog(Dialog.D_OK, "Look out!!!",
Dialog.OK,
Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION),
Manager.VERTICAL_SCROLL);
ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);
}

 

Users Online
Currently online: 27 members 1,606 guests
Please welcome our newest community members: