How do I intercept back button on nokia X?

Get help using Construct 2

Post » Wed Mar 05, 2014 1:12 pm

I tried to publish one of my Android games in the new Nokia X platform, but it was rejected because the expected behaviour when the back button was pushed was not implemented. The user/tester expects the mobile to go back to the previous screen when the user touches the back button.
I export my Contruct game to android(XDK), then compile it with the intel cloud compiler (XDK 0 419 GOLD Crosswalk 3.31.35.0 on Cordova 3.0).
But even if I can trap the back button (using the XDK plugin) I cannot exit the game.
Any Idea?
If there's no way to exit the game, there's no way to publish on Nokia X !!!!
B
6
S
1
Posts: 5
Reputation: 412

Post » Wed Mar 05, 2014 1:22 pm

you can use the "browser" object. it has an "on back button" condition.

On the browser object there is also a "close" action which should close the game.

(havent tried this on Nokia though. But it works on other platforms)
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Mar 05, 2014 2:22 pm

@cvp

Tnx for help.
Do you mean somenthing like this?
Image
I ususally use the IntelXDK "on back button pressed" event to navigate back to other layouts within my game, but the "Browser close" action seems not to close the game. I just made a quick test on my galaxy with negative results.
In you experience is it just enough to call "Browser -> close " action to exit an Android game?
Can it be that I make some mistake somewhere?
B
6
S
1
Posts: 5
Reputation: 412

Post » Wed Mar 05, 2014 3:56 pm

I actually first started using it for the games I made for Tizen. (it is not in my current android published games)

On Tizen it is enough to close the game, I have not tried it on other platforms.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests