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
New Developer
Posts: 32
Registered: ‎05-05-2014
My Device: 9780
My Carrier: Idea
Accepted Solution

how to check that my app is in background from background thread

i am listening push in background thread but i want to receive push only when application is in background then how can i check that app is in background

Developer
Posts: 16,987
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: how to check that my app is in background from background thread

check if it is listed in http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html...

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to check that my app is in background from background thread

Sorry, have to ask, why would you NOT want to receive a push message when you are in the foreground?

New Developer
Posts: 32
Registered: ‎05-05-2014
My Device: 9780
My Carrier: Idea

Re: how to check that my app is in background from background thread

@peter_strange good question the only case that when user is using app i dont want to show message on blackberry homescreen so i listen push in foreground also but dont want to show indicator when user browsing the app

Developer
Posts: 16,987
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: how to check that my app is in background from background thread

if you mean with "background" that you don't close your app but minimize it only you need to use a different check like UiApplication isForeground

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter