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

Adobe AIR Development

Reply
Developer
sujachristy
Posts: 63
Registered: ‎12-10-2012
My Device: Blackberry 9900
My Carrier: Vodafone-in

Show an alert before closing application

Hai all I would like to show an alert when the user is aboutto minimize the app. Also after selecting the required choice from alert box the user can the quit the app. Say my alert box have 2 button 1. "quit app" 2 "Dont quit app". If user choose 1 the close the app or if the user choose button 2 then the app shouldn't close.. Is this possible..??

 

Any help is appreciated.

Thanks in advance

_______________________________________________________
Help is available everywhere but you have to look at the correct place.
By Me :-)
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Show an alert before closing application

You can capture when the app is minimized, but this would not be a consistent UX for the user. Is there a good reason why you would want this done?
Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Show an alert before closing application

Ya you would be able to display the alert but the app would minimize anyway. The BlackBerry 10 OS does not allow an app to lock a user in.

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Show an alert before closing application

[ Edited ]

There is a difference between minimizing and closing.

 

For closing, it can be done in Cascades:

http://developer.blackberry.com/cascades/reference/bb__applicationsupport.html#function-setcloseprom...

 

That doesn't help much in AIR unless we can figure out what Cascades does internally...

 

Anyhow, a kiosk mode would be very good. There are numerous valid use cases: self-completion interviews, public information displays, party music choosers, walled kiddy gardens, voting systems...

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
Developer
sujachristy
Posts: 63
Registered: ‎12-10-2012
My Device: Blackberry 9900
My Carrier: Vodafone-in

Re: Show an alert before closing application

yes I do, need to let user that some features wont be availble when app is closed.
_______________________________________________________
Help is available everywhere but you have to look at the correct place.
By Me :-)
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Show an alert before closing application

What features can still run after the app closes?
Please use plain text.
Developer
sujachristy
Posts: 63
Registered: ‎12-10-2012
My Device: Blackberry 9900
My Carrier: Vodafone-in

Re: Show an alert before closing application

the timer wont be working when the app closes so I need to alert the user about this.
_______________________________________________________
Help is available everywhere but you have to look at the correct place.
By Me :-)
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Show an alert before closing application

Probbly need to let them know when they set the timer. For example "Closing the app will stop the timer from working". Pro-active message vs. re-active message.
Please use plain text.
Developer
Ebscer
Posts: 843
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Show an alert before closing application

You need to expect that the app will close at any time.

 

If you want to warn against closing the app completly, perhaps you will want to do that in your Active Frame...


Read my thoughts on BlackBerry Development at news.ebscer.com
Please use plain text.