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

Native Development

Reply
Highlighted
Developer
Posts: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition
My Carrier: Vodafone

How to push your app in foreground on some event

Hi,

 

I am working on some battery stuff. Displaying an alert message when battery is low.When the application is in background it does display dialog but I need to force the application to foreground.How can I do that? Any reference to github samples?

Rujuta Trivedi
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: How to push your app in foreground on some event

There's this but it's linked to NFC so not sure it will work,

 

http://developer.blackberry.com/native/reference/bb10/nfc_libref/topic/nfc_se_transaction_foreground...

 

NFC obviously needs to interrupt current flow, however I'm not sure I would agree (as a potenial user/purchaser) with this design choice for a battery app. The notification system is there so that the user can choose whether to bring your app to the front based on what he/she reads in a nice non-invasive way.

 

Perhaps if you make it the default that your app does *not* interrupt what I'm currently doing and put a user setting in that enables that behaviour for those that would wish to be it would be a friendlier design.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: How to push your app in foreground on some event

Hi, 

 

At this time there's no simple way to bring your application to the foreground.

 

Here's a thread where it was discussed, http://supportforums.blackberry.com/t5/Cascades-Development/How-to-make-the-background-app-to-be-vis...

--
Rob is no longer associated with BlackBerry.
Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: How to push your app in foreground on some event

Hi,

 

Without a SE triggering a transaction due to some external NFC exchange - that function will return NFC_RESULT_SE_REQUEST_REJECTED

--
Rob is no longer associated with BlackBerry.
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: How to push your app in foreground on some event

Hope this will not ever be available. I would hate another app pop in front of the current app that I am using. Hate when desktop apps do this. Very disruptive. The notification method is just fine. If it does become a feature, should be permissions based and able to turn off per app under the device settings.