Handle back button via code javascript [phone 8.1]

0 favourites
  • 3 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Hey, since plugin to handle back button doesn't work while exporting as universal app i want to do it manually (in code) but dunno how, because didn't even write anything in JS.

    Could someone help me? I just want close app when it is on start screen, and go to start screen when it is on any other layout. (Now app goes to suspended mode when press back on any layout)

    Where should i start?

    Probably base.js file.

    I Found this code and im prety sure that i have to handle it here:

            backclick: [
                function Application_backClickHandler(e, handled) {
                    if (handled) {
                        e._winRTBackPressedEvent.handled = true;
                    } else if (WinJS.Navigation.canGoBack) {
                        WinJS.Navigation.back();
                        e._winRTBackPressedEvent.handled = true;
                    }
                }
            ],[/code:10teo5gt]
    
    i can post whole code if needed.
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you use the browser object's back button, then it should work just fine. I have only tested it on Windows 8.1 phone universal app.

  • How I could miss that. Thank you so much. Its working

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)