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
57
S
7
G
6
Posts: 52
Reputation: 7,238

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: 708
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
387
S
230
G
88
Posts: 24,249
Reputation: 192,450

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
57
S
7
G
6
Posts: 52
Reputation: 7,238

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
69
S
21
G
7
Posts: 827
Reputation: 10,017

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: 439
Reputation: 6,876

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
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

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: 439
Reputation: 6,876

Post » Mon Apr 02, 2012 10:11 pm

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

Post » Tue Apr 03, 2012 7:56 pm

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

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, marcoscodas, part12studios, stevenode and 9 guests