How do I dectect android buttons and go fullscreen

Get help using Construct 2

Post » Mon Sep 01, 2014 11:00 am

Hello,
I'm still a newbie at construct 2 and I'm making my first game. Its a simple pong game for android devices.

I use the Letterbox scale option for full screen and well there aren't any borders, but it does show the standard android controls. So it will have the three buttons for back, home and window...as well as the bar at the top showing battery, time, network etc.

Is there any method of hiding them to the background and allowing the game to take over the full screen?

Also, is there a method for detecting when the user presses any of these buttons? e.g. when the user presses the back button, my game can prompt the user asking are they sure they want to exit? and maybe i can save the game state when they do.

Ive searched the tutorials and forums for this and no one has mentioned these controls showing, only borders at the sides.

I've also tried all the scaling options. Maybe there's an option in the intel XDK?

Any Help would be appreciated!

James
B
3
Posts: 3
Reputation: 181

Post » Mon Sep 01, 2014 12:12 pm

@Roadiek9

Use the Browser plug-in

Do the Browser->Request Fullscreen action to go fullscreen. Although if you use a wrapper - Crosswalk, CocoonJS, PhoneGap - it should handle fullscreen for you with the right settings.

You can use Browser->On back button and Browser->On menu button conditions to check for the buttons being pressed
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
32
S
9
G
7
Posts: 444
Reputation: 6,731

Post » Tue Sep 02, 2014 6:08 am

I must be doing something wrong.

I've added the browser plugin, and requested fullscreen. I export it for android out of construct and use intel XDK and i select the build option crosswalk for android and still the android bars are showing through.

I have to be missing something somewhere?
B
3
Posts: 3
Reputation: 181

Post » Wed Sep 03, 2014 11:08 am

I found where i was going wrong. In the intel XDK, I had liked the full screen for android. Only just noticed the tabs for android - crosswalk android - ios - windows. i didn't click full screen under the 'crosswalk android' tab.

It hides the bar at the top with the battery and time. but it doesn't hide the three buttons at the bottom. Although I'm a lot happier with that.

Maybe someone can update this with how to hide the android navigation buttons?
B
3
Posts: 3
Reputation: 181


Return to How do I....?

Who is online

Users browsing this forum: htmlgames and 4 guests