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: 45
Registered: ‎11-29-2011
My Device: Blackberry Torch 9800,Blackberry Curve 9300
Accepted Solution

which method is called when screen lost focus but still visible in blackberry ?

hi,

I want to know in blackberry which method is called when screen lost focus but still  visible ?

For example ,  one screen is in foreground and we disply dialog box then that screen is visible but has not focus, so  at that time which methos called when we close that dialog box??

Please help me please please

Highlighted
Trusted Contributor
Posts: 145
Registered: ‎05-01-2011
My Device: 9780
My Carrier: Developer

Re: which method is called when screen lost focus but still visible in blackberry ?

[ Edited ]

Override the following methods in your screen class as per your requirements

 

1. When the screen pushed in to the stack

 

Call

    onDisplay() or

    onUiEngineAttached(boolean attached) - if attached is true then your screen is in the top of the screen

 

2. When you are in a screen and lcd backlight turns off in your idle state and again turns on when you are actively performing in that screen

 

call

      onVisibilityChange(boolean visible) - if visible is true then you are getting the focus when the lcd turns

 

3. When your application goes to the background by clicking the red end button (i.e., without quiting the app, still yours is in active in the background)

 

call

      onExposed() - when your app comes to foreground from the background or when any screen which is in the top get popped off

 

& call

         onObscured() - when your app goes to the background or when a screen pushed over your current top most screen

 

Contributor
Posts: 45
Registered: ‎11-29-2011
My Device: Blackberry Torch 9800,Blackberry Curve 9300

Re: which method is called when screen lost focus but still visible in blackberry ?

I am calling "PROFILE " of BB on one navigational click but problem is that when i set Profile to vibration or anything else it is not reflecting change immidieatly ...any idea ???
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: which method is called when screen lost focus but still visible in blackberry ?

You should start a new thread for a new quesiton.

 

Please mark this one "solved".