Force full screen mode in browser

I am trying to make a solution fit on to a small Android (Amazon Fire HD 8) tablet screen, but the built in browser (Silk) doesn’t have a ‘full screen’ option/button/menu, so there is always a bar across the top (with time etc.) & across bottom (with back/home etc.), as well as the URL bar.
I want to allow the user to click a button on my Servoy form that tells the browser to switch to ‘full screen’ mode.
I found an article that says it supports the Mozilla command “requestFullscreen”, but I don’ know how to get Servoy to send that to browser
https://amazon.developer.forums.answerhub.com/questions/197877/why-does-silk-browser-full-screen-now-have-a-soft.html?cmdf=silk+browser+kiosk+mode

I know it’s possible for a browser to run full screen, as there is this one that I had to sideload that can do it, but requires a ‘hack’ & payment to enable some of what I need (this is me testing for a client to deploy to multiple sites, so don’t want them to have to ‘hack’ each site’s tablet & have to pay lots extra just to get my solution to fill the screen ;-) )
[The reason I am trying this particular device is due to the fact that it is currently, probably, the cheapest Android tablet (£~80) from a decent company with a reasonable resolution (1280x800) & a reasonable back camera (5MP), as client will need to take photos to upload in solution]
I have installed
svyUtils
svyUtils$NGClient
ngclientutils
(as well as lots of other stuff…)
Thanks in advance
Rafi

Hi Rafi,

if I follow the links you provided I bump into this code:

function toggleFullscreen() {
  let elem = document.querySelector("video");

  if (!document.fullscreenElement) {
    elem.requestFullscreen().catch((err) => {
      alert(
        `Error attempting to enable fullscreen mode: ${err.message} (${err.name})`
      );
    });
  } else {
    document.exitFullscreen();
  }
}

This points into the direction of showing a specific element of a site as fullscreen, so I don’t know if this will work for the entire application (this means you can try to show the total body part of the browser in full screen)

Anyway, in order to trigger this from Servoy, you will need to add this function to your application using an Angular Service similar to for example the Key listener service which you can install through SPM.
You can find the sources of the Key Listener on Servoy’s GitHub repositories, to give you an idea on how to structure that.

Hope this helps

Hi Marc,
thanks for your reply
I will look in to that as an option, but was obviously hoping for an easier way to do it with Servoy (latest) ‘out of the box’ ;-)

Can imagine that, however these things are outside Servoy’s control and especially on Android you have to deal with different browsers.
I believe iOS is easier in this way, but cost of device is higher.

At least there is an easy possibility to extend Servoy with custom logic to have more control over whatever is happening in the browser.