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
Regular Contributor
kamaleshpandey
Posts: 91
Registered: ‎11-10-2009
My Device: BB 9810
My Carrier: Generic

how to track screen painting actions when application in background

how to track screen painting actions when application in background after switch application.

 

My application is chat application when ever i switch it in background mode still my screen get updated due to recived feeds , how to stop painting of screen in background mode

Kamalesh
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to track screen painting actions when application in background

You can detect that your app is in the background using

<application>.isForeground()

 

Remember that the Application deactivate() method is called when the app goes to background, activate() is called when coming to foreground.  You might be able to use these.

 

One thing I would also consider is onObscured() and onExposed().  onObscured to switch it off, onExposed to refresh the screen.  The only problem is these are called in other circumstances, not just swap to background. 

Please use plain text.