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

Web and WebWorks Development

Reply
Highlighted
Contributor
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile
Accepted Solution

Is there any way to listen to the app exit event in webworks?

Dear All,

 

Is there any way to listen to the app exit event in webworks?

 

What I would like to do is:

 

Pop up a warning message (told them the notification feature will be disabled) to the user when they are trying to close the app.

 

I saw resume, pause event in the documetn as here: https://developer.blackberry.com/html5/apis/v2_0/blackberry.app.html

 

And find the on exit event for playbook, bbos : blackberry.app.event.onExit()

 

But didn't find any on exit listener for BB10.

 

Could you please provide any valuable resource or information regarding this?

 

Thanks for the help.

BlackBerry Development Advisor
Posts: 137
Registered: ‎01-19-2010
My Device: BlackBerry Z10
My Carrier: AT&T

Re: Is there any way to listen to the app exit event in webworks?

Unfortunately the platform as a whole does not allow you to "pause" the application termination process. Even if we hooked the event, the web runtime would be in the process of being torn down before you could do anything meaningful.

 

Sorry I don't have better news.

Ken Wallis - Senior Product Manager, WebWorks and Android Runtime
@ken_wallis