11-09-2011 02:13 PM
IS anyone interested in creating an extension for webworks tablet SDK that incorporates an application event that catches an app exit event? The webworks smartphone SDK has it here, https://bdsc.webapps.blackberry.com/html5/apis/bla
Basically I would like to have this functionality available in the tablet SDk because right now there is no API to catch this event. I have very limited skills when it comes to java, dabbled a bit with it, but definately don't have what I need to write my own custom extension in webworks. I have seen the tutorial showing how to write the custom file IO api but without knowing java that well it is hard to figure out how to make this extension myself.
I am hoping that someone has already done this because I find it hard to believe that someone out there hasn't needed this functionality. Thanks for the help.
11-10-2011 07:18 AM
11-10-2011 04:42 PM
Ok so what are my options for gettings this working? This is something I need to get running for my application to run properly. Can you point my to the proper file in the webworks tablet api that is called on exit? Thanks for your help Tim.
11-10-2011 05:29 PM
You don't really have a lot of options.. You would likely have to write your code in ActionScript to handle the exit. You can trap the exit in ActionScript:
11-10-2011 05:42 PM
Ok thanks Tim. I was just thinking is there a way to listen for a swipeup event in webworks? This way I could check if its ok to close if not delay until it was ready....is this possible? Thanks for all your help.
11-10-2011 05:45 PM
There isn't a way in any application (AIR/WebWorks) on the PlayBook to listen for swipe-up events. Just swipe-down.
The best the AIR guys have done is listen for those events outlined in the URL I posted.
09-12-2012 04:51 AM
I also think this is a serious limitation of the WebWorks SDK. There's just not enough control over the application life cycle and without this kind of control, the whole experience could be badly compromised.
Where can we formally ask for this as a feature request?
09-12-2012 07:45 AM
Its hard to do because when you listen to the onExit on AIr you get the event but the WebView for the Client has been destroyed by then.
Its a timing issue.
So what do you want to do in an onExit call? Perhaps I can find an alternative solution for you.
Haven't solved this for BB10 yet but we are trying to figure it out.
09-12-2012 03:48 PM
Doesn't the onBackground and onForeground (PB) and .pause and .resume (BB10) help?
The way I understand it, these are fired when user swipes up causing the app to be paused. You would want to save at this point.