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

BlackBerry Push Development

Reply
New Contributor
thanhtrand
Posts: 9
Registered: ‎09-27-2012
My Device: Curve 9220

Webworks Push app (OS 6 + OS 7) only launched in background not in foreground when push comes

[ Edited ]

Hi all,

 

I'm developing Blackberry Webworks application that supports BIS push. Everything works fine when app is opening. But if push comes while app closed, app will be launched in background not in foreground.

 

My questions are:

 

1. Does Blacberry webworks push just support to launch app in background if push comes while app closed?

 

2. If app is in background and push comes, will app launched in foreground?

 

3. Does Blacberry webworks push support to display something likes badges on app icon or red sign (like email app) on app icon or playing sound when push comes?

 

P/S:

I found this from https://developer.blackberry.com/html5/apis/blackberry.push.html#.openBISPushListener

 

"If an application registered to BIS push is closed and a push message arrives, the application will be launched in background and the wake up page is displayed. rim:allowInvokeParams="true" attribute must be specified in the content element of config.xml."

 

Thanks you very much?

Retired
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10

Re: Webworks Push app (OS 6 + OS 7) only launched in background not in foreground when push comes

Hi,

 

Yes, the app will only be launched in the background when the new push comes in.  This is intentional, so if the user is doing something else in the foreground, then this push won't distract them from what they're doing.

 

If you want your app to move from the background to the foreground for any reason, then check out the blackberry.app.requestForeground API from WebWorks.

 

https://developer.blackberry.com/html5/apis/blackberry.app.html#.requestForeground

 

Thanks,

 

Matt

New Contributor
thanhtrand
Posts: 9
Registered: ‎09-27-2012
My Device: Curve 9220

Re: Webworks Push app (OS 6 + OS 7) only launched in background not in foreground when push comes

Hi mdandrea,

 

Thank you. Your post really helps me.

 

Thanks,

 

thanhtrand