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
Contributor
Posts: 14
Registered: ‎07-02-2012
My Device: BlackBerry 9930
My Carrier: BlackBerry

Switch Application

In My Application, There is functionality of switch application and it works perfectly fine..  But I want to code on switch Application.

 

At the Time of Pressing switch application, I want to ask " Are you sure that you want to Logout? "

 

Can I do that?

 

If Yes, then How?

 

Please help me..

 

Thanks in Advance.

Elite II
Posts: 7,974
Registered: ‎06-01-2012
My Device: Curve
My Carrier: BSNL

Re: Switch Application

[ Edited ]

Riddhi_Barbhaya wrote:

In My Application, There is functionality of switch application and it works perfectly fine..  But I want to code on switch Application.

 

At the Time of Pressing switch application, I want to ask " Are you sure that you want to Logout? "

 

 


Hi Riddhi_Barbhaya

 

Welcome to BlackBerry Support Forums

 

This is  Curve device section , I am sure you will get your answer on Developer Support Section .

 

___________________________________________________________________________

Click " Like " if you want to Thank someone.
If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Switch Application

At switch time, the Application method deactivate is called.  In there you can do something. 

 

Remember that this is just putting your app into the background.  If the user clicks on your icon again your app will come to the foreground.  So you are not really logging out.  It is a bit like switch user in Windows. 

 

If you want to pop something, this is how I would do it. Execute an invokeLater, in the invokeLater, start a global popup with a close listener, asking the question.  In the listener, if the user says they want your app back, then requestForeground.

 

One problem I see with this is that the same process is called when a phone call comes in.  Not quite sure how to handle that.