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

New Contributor
Posts: 3
Registered: ‎07-15-2012
My Device: BB10 Dev Alpha
My Carrier: Starhub
Accepted Solution

How to detect application closing



     I would like to ask how to detect application closing? I would like to add some action (for example, saving settings and etc) when a users closes the application. Thanks

Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to detect application closing

In Cascades you'll generally want to hook a slot to the aboutToQuit() signal.


Documentation here should lead you to all you need to know: https://developer.blackberry.com/cascades/reference/bb__cascades__application.html#setautoexit

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!