You can clone with
Two APIs need to be exposed for this to be truly useful feature
The application will get 3 seconds to terminate, if the application requires more time to exit then it must call extendTerminate(). Each time extendTerminate is called the application will get 2 more seconds to exit.
If the app does not terminate in allotted time it will be exited by the navigator.
Listen to exit event from the webplatform, under application.
Can the app extend indefinitely? Seems like we shouldn't allow it to effectively never close.
Implementation of blackberry.app.extendTerminate and exit event
can we use it to cancell the exit process ?... i mean, the user try to exit (but wrong or repent) then fire the callback and inside the callback a toast with the onclick button to cancel. I think use "toast" because the countdown time.