开发者

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

开发者 https://www.devze.com 2023-03-14 00:38 出处:网络
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?

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

精彩评论

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