Hide mobile address bar

Get help using Construct 2

Post » Wed Dec 21, 2011 1:58 am

Hello!
How to hide the address bar in mobile browsers (iPhone android)?
I searched the internet and found examples of Java scripts. But I can not figure out where to insert the code. I tried to insert it into the main game class. But the result was not.
If someone is faced with this decision, or who knows, help me please.

Thank you!
B
53
S
7
G
6
Posts: 51
Reputation: 7,136

Post » Wed Dec 21, 2011 10:34 am

@DiscoFish: when you have javascript code specific to some platforms, you can add it to the index.html file, when your game is exported. You nedd to paste it in the <head> section.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Wed Dec 21, 2011 3:22 pm

Are you using a 'fullscreen in browser' mode? The browser should automatically hide its address bar in that case. You might be interested in supporting multiple screen sizes.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Thu Dec 22, 2011 3:31 am

Sure, I used a 'fullscreen in browser' mode. I used the "scale mode" and "crop mode". I tested it on Android and iPhone. But the result is the same.

Screenshots from "crop mode"



Screenshots from "scale mode"



Unfortunately I do not have iPhone, and so I can not take screenshots.

Can you help me please?
Please test the example
Download .capx
(only the image but I think this is enough to test)

Thanks!DiscoFish2011-12-22 03:31:50
B
53
S
7
G
6
Posts: 51
Reputation: 7,136

Post » Thu Dec 22, 2011 4:34 am

i know that a way to hide the adressbar is by adding the site/app to the homescreen (for iphone), then when you launch it from the homescreen its gone

im not sure if there is a way to set it automatically
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Mon Apr 02, 2012 6:21 pm

Sorry about ressurecting the post, but Im having the same issue on android 2.3.4.
Does someone have a fix for this problem?
Thank you.
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Mon Apr 02, 2012 6:33 pm

@Ashley, A little bit unrelated, but do any of the native wrappers manage to hide the small black bar with time, battery, etc?
This is a must for professional looking apps.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Mon Apr 02, 2012 9:19 pm

I think I saw something about this on another topic, it seens you can remove the status bar on phonegap.

http://www.scirra.com/forum/phonegap-appmobi-pros-and-cons_topic49362.html
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Mon Apr 02, 2012 10:11 pm

add
<preference name="fullscreen" value="true" />
to config.xml
B
22
S
11
G
9
Posts: 133
Reputation: 6,572

Post » Tue Apr 03, 2012 7:56 pm

where can I find this file?
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Next

Return to How do I....?

Who is online

Users browsing this forum: alanziy, Vegamon007 and 21 guests