How to access to Android's back button?

Get help using Construct 2

Post » Mon Dec 09, 2013 7:51 am

up up up
B
12
S
3
Posts: 25
Reputation: 1,430

Post » Mon Dec 09, 2013 9:35 pm

B
12
S
3
Posts: 25
Reputation: 1,430

Post » Mon Oct 13, 2014 3:40 pm

BUMP

is there a C2 native solution for back button support on mobile? This is the thread that comes up in google search results. Apologies if my google-fu has failed and it has been answered elsewhere.

[Resolved] This has since been added to the browser object, and I did not think to look there.
Last edited by skelooth on Mon Oct 13, 2014 6:35 pm, edited 1 time in total.
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
13
S
4
Posts: 303
Reputation: 1,705

Post » Mon Oct 13, 2014 5:52 pm

skelooth wrote:BUMP

@ashley

is there a C2 native solution for back button support on mobile? This is the thread that comes up in google search results. Apologies if my google-fu has failed and it has been answered elsewhere.

I never tried this but I just happen to use browser object now and saw home button and back button from browser object. Have you tried this?
B
27
S
8
G
4
Posts: 553
Reputation: 4,839

Post » Mon Oct 13, 2014 6:37 pm

Dur, I'm going to have to self reference my own post.

viewtopic.php?t=115988

-_-
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
13
S
4
Posts: 303
Reputation: 1,705

Post » Mon Oct 13, 2014 10:54 pm

I don't know why people keep bumping this, the Browser object has had 'On back button pressed' for ages.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat Apr 04, 2015 11:16 am

"Brower -> On back button" is there but it does not work OTB (not on my Galaxy S4), and I think this gives a lot of confusion. I spent some time digging in the Internet and solution for me was to add the following lines:

Code: Select all
<script type="text/javascript" src="cordova.js">
<script type="text/javascript" src="intelxdk.js">


To the index.html in XDK. As far as I know it doesn't work for iOS but I am not able to test it.
Image
B
24
S
11
G
42
Posts: 794
Reputation: 24,606

Post » Tue Mar 08, 2016 2:25 pm

I'm looking for solution too, gamers are pretty annoyed, that back button doesn't do anything in my game :(
Try my creations on newgrounds or Google play, feedback highly appreciated!

ImageImage
B
9
S
1
Posts: 73
Reputation: 785

Post » Tue Mar 08, 2016 3:09 pm

Ah I see there is a really old post of mine above :D.

Basically Browser -> on Back Button works and I think there is no way so that button wouldn't work. It works even with CocoonIO, which has limited browser functionality. You just have to export the game as Cordova project, not HTML5. Otherwise you will have to add manually the two lines I've mentioned a year ago.

Maybe post some screenshot? Which wrapper do you use? Do you export as Cordova?
Image
B
24
S
11
G
42
Posts: 794
Reputation: 24,606

Previous

Return to How do I....?

Who is online

Users browsing this forum: alextro, MarkStockley and 0 guests