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
Highlighted
Developer
Posts: 263
Registered: ‎05-18-2011
My Device: Curve 9300, BB10 Dev Alpha C, Z10
Accepted Solution

Why registerToLaunch and unRegisterToLaunch?

Hi,

 

We develop push-enabled apps because we want the apps/users to be able to receive push messages. Currently, on BlackBerry 10, in order to receive push messages, we HAVE TO call registerToLaunch(). Why does not BlackBerry make this call by default? In other words, are there any use cases that we do not need to call registerToLaunch() and still receiving push messages?

 

cheers,

--tom
Retired
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: Why registerToLaunch and unRegisterToLaunch?

Hi Tom,

 

We wanted the developer to explicitly indicate that they want to launch their application when a new push comes in and their application is not running.

 

There is a possible use case where you only want your application to receive pushes when it's actually running (i.e. has been started up by the user).  If the app is closed and pushes are sent, they would be dropped for this use case.

 

You could argue that the "registerToLaunch" use case is more common, but again, we wanted developers to make this call explicitly to confirm this is the behaviour they desire.

 

Thanks,

 

Matt