Back button - Universal Windows Store App

Get help using Construct 2

Post » Thu Apr 17, 2014 9:50 pm

I couldn't find an answer anywhere, so I figured I might as well ask on the forum. Is there any way to intercept the mobile back button (or the search button for that matter), with the Windows 8 plugin ? I tried the classic Browser "on mobile back button pressed", but my phone kept minimizing the app. :(
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Fri Apr 18, 2014 6:13 am

Are you trying to get it to close? If so what you can do is "Browser on suspend" execute javascript close() and close it that way.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Mon Apr 21, 2014 9:17 pm

@PhoenixNightly Yes and no, I want the back button to trigger something in my app. It seems my device intercepts any event using "On mobile back button pressed" to minimize the application. "On suspend" doesn't help either, pretty much in the dark here...
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Tue Apr 22, 2014 2:01 pm

*bump*

Still looking for solutions here !
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Tue Apr 22, 2014 5:38 pm

B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Tue Apr 22, 2014 9:15 pm

@Magistross
I haven't done this in C2 yet, but I had implement the Back button in Unity. And the trigger these devices shoot out is the Escape KeyCode. So try that out and see if it works. I'm at work and not 30m ago had to deal with this. Good luck.
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Wed Apr 23, 2014 2:30 am

@jayderyu I seem to have found what I was looking for with the listener "onbackclick" of the WinJS "app" instance. But I just can't seem to tell the c2 runtime to trigger the mobile back button event.

I tried using the cr_getC2Runtime() function to get the runtime reference and then use the "trigger" method, but I find no way to reference the Browser plugin instance...

Any idea ?
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Thu Apr 24, 2014 12:19 pm

One more shameless bump in hopes to get more input on this !
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Thu May 08, 2014 3:48 am

I really don't know what was wrong, but I basically exported the same test project with no modification then suddenly the back button started behaving accordingly... D:
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 31 guests