Hiding address bar in mobile

Hi guys, I’m struggling to find a way of hidding the address bar in mobile.

I’ve already read this topic: Struggling to run in full-screen mode (iOS + Chrome) (not completly)
and this one: [SOLVED] Fullscreen removes all UI which worked for standalone.

At the first link I saw that fullscreen is not compatible with some mobile browsers… but what about hiding the address bar?
I can’t believe this single row can’t be manageable like toggling on and off or something like that. :weary:

I’m programming on javascript here for about 2 months, I advanced a lot but these little details hard to reach doesn’t make sense to me… am I too ignorant or is it really a hard coded feature to reach?

my build in early phase: https://playcanv.as/p/6d035c06/

I’m afraid there simply isn’t a cross browser way to do this on mobile. Chrome supports the fullscreen API, but iOS doesn’t. This is an OS-level thing on iOS and the behaviour differs depending on the device. (You may have seen on iOS that the browser auto-hides the address bar when you switch from portrait to landscape, but only on certain devices).

1 Like

So far I just use portrait mode and display a ‘switch back to portrait’ overlay, as soon as the user turns the iphone…

this.sw = this.app.graphicsDevice.width;
this.sh = this.app.graphicsDevice.height;
if (this.sw > this.sh) {
   this.nolandscape.enabled = true;
} else {
   this.nolandscape.enabled = false;
}

It’s really painfull that it doesn’t make sense to create something cool for smaller apple devices -
cause the fxxxing menu bars block half of the view on the website

:frowning:

2 Likes

This is a very bad issue cause it degrades a lot the final product :s

Yeah, Apple has actively been going out of it’s way to prevent users doing that. Initially there were hacks that could get around it, but in the latest versions of the OS, there is no option. Then there is the issue of swiping from the edge of the screen (goes back in the browser) and pinch to zoom, which makes browser games on iOS a nightmare.

Still it looks to me that landscape works since iPhone 6 right? So I can just check for the pixel size and if someone has something with a smaller resolution I can write: “Please buy an android phone!”? :slight_smile:

2 Likes

Yes, that is my understanding as well. Al though there is a ton load of money at stake for the mobile phone app-developer community, Apple seem to have embraced the notion of letting it work since that (iPhone 6).
The version share prior to the iPhone 6, is graduatingly diminishing … to f.i. 5.77% in 2018 (https://9to5mac.com/2018/09/11/most-common-iphones-in-use/).
In 2019 around the same, though a little higher => 6%: https://deviceatlas.com/blog/most-popular-iphones