后台应用如何Alert黑莓手机用户

注意代码中的sync部分内容,有点意思

 

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); }

 

原文: http://supportforums.blackberry.com/t5/Java-Development/Alert-a-BlackBerry-smartphone-user-from-a-Background-application/ta-p/442901

你可能感兴趣的:(UI,dialog,手机,黑莓,scroll)