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

Reply
Highlighted
Developer
Posts: 51
Registered: ‎10-21-2008
My Device: Bold 9000
My Carrier: Dialog
Accepted Solution

How to exit Blackberry Application Properly

Hi,

 

I developed a black berry application which enable user to retrieve his production line information to the blackberry screen. The matter is when user run this application 2 or 3 times the phone get stuck. It work fine again only if he remove the battery and restart the phone. If the user run my application again this happen again. 

 

I used this method to close my application

 

public boolean onClose()
        {
            System.exit(0);
            return true;
        }

 

Is their any proper way to do this? Please explain me what kind of error my program has.

 

Thank you very much.

 

Prasad.

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to exit Blackberry Application Properly

Hi,

  Try this.

public boolean onClose() { return super.onClose(); }

 

 

 

Tnx.


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 51
Registered: ‎10-21-2008
My Device: Bold 9000
My Carrier: Dialog

Re: How to exit Blackberry Application Properly

HI,

 

Thanks for your quick reply.

 

It seems working. But it asked for save changes always. Is their any way to stop that alert without saving changes?

 

Thanks.

 

Prasad.

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to exit Blackberry Application Properly

Hi Prasad,

     Try this.

    

public boolean onClose() { setDirty(false); return super.onClose(); }

 

 

Tnx.


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 51
Registered: ‎10-21-2008
My Device: Bold 9000
My Carrier: Dialog

Re: How to exit Blackberry Application Properly

Hi dear,

 

Thank you so much. It works fine.

 

Great help...

 

Prasad.