开发者

Exit routine for blackberry - similar to MIDlet.destroyApp(boolean)

Is there an exit routine that will be called by the runtime every time a blackberry app signals that it wants to exit, similar to MIDlet.de开发者_C百科stroyApp(boolean) for traditional midlets?

If none exists, how do you ensure for instance that a particular task gets executed just before a blackberry app exits?


I think you are looking for onClose() method

 public class MyMainScreen extends MainScreen {
        public MyMainScreen() {
            super();
        }
        public boolean onClose() {
            // Your code here
        }
    }
  public boolean onClose()

Indicates a close event has occurred. The default implementation is activated by specifying DEFAULT_CLOSE. It will call onSavePrompt if the screen is dirty, then call close() if sucessful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜