gaurachit
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2017
07:11 AM
Exit from app with confirmation
I want to show a confirmation dialog box for exit from app. If user press "yes I want to exit" only then it should exit.
My application flow is:
It has one sceneNode having different groups as components. I am showing and hiding then with the help of visibility.
Now when I come to the very first component then with the help of keyEvent I can check the back button pressed and I am showing a dialog with confirmation Now when user press "Yes" then What will be the best way to close/exit the application. I am able to get this by hitting a post request as follows:
"http://localhost:8060/keypress/Home".
I tried many other things but failed to exit from app. Please suggest a better way if any.
Thanks
My application flow is:
It has one sceneNode having different groups as components. I am showing and hiding then with the help of visibility.
Now when I come to the very first component then with the help of keyEvent I can check the back button pressed and I am showing a dialog with confirmation Now when user press "Yes" then What will be the best way to close/exit the application. I am able to get this by hitting a post request as follows:
"http://localhost:8060/keypress/Home".
I tried many other things but failed to exit from app. Please suggest a better way if any.
Thanks
3 REPLIES 3
gaurachit
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2017
05:52 AM
Re: Exit from app with confirmation
I didn't get any reply for my question above. I think this is a common requirement.
If anyone encountered this kind of problem please response here.
Thanks
If anyone encountered this kind of problem please response here.
Thanks
Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2017
07:08 PM
Re: Exit from app with confirmation
I simply RETURN out of my Main() Function, but it might work differently with scene graph.
rymawby
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2017
06:56 AM
Re: Exit from app with confirmation
Komag is correct with SceneGraph apps you have to exit out of your Main() function. I like to do this by using your main port as a handler. I've explained how to do this fully here along with source code/app. Hope this helps.