im searching the forum for over three hours now and didnt find a solution, maybe someone can help me out?
im trying to make a game for an FirefoxOS device and dont get it to run in fullscreen.
first i exported it to "html5 Website" and tryed out the different fullscreen modes and "hide address bar", i also exported it to "Open Web App", hosted both on my webspace and they behave just the same.
both, address bar and "bottom" bar are showing.
can anyone point me in the right direction?
Probably something about the App manifest file:
thanks for the input!
but its already in the manifest: "fullscreen": "true"
or is my failure to access the game in the browser by its url? how should i do otherwise?
Are you running it from the browser? If so, you need to use the Browser object's 'Request fullscreen' action. If you're publishing an app to Firefox Marketplace, the fullscreen setting in the manifest should take care of that.
Develop games in your browser. Powerful, performant & highly capable.
yes, i exported the game as "Open Web App" - "Hosted App", put it on my webspace and went to the url with the browser.
i also tryed "packaged App" but the output seems pretty much the same, but im sure i just dont see the difference.
it seems that the mobile browser dont react on the 'Request Fullscreen', or maybe i did something wrong?
here is how i did it
<img src="http://fldr.de/requestfullscreen.jpg" border="0" />
while im still in an early learning process i dont want to publish my game on the marketplace but i would realy like to know how it behaves when "installed".
Is there a way to host the packaged App by myself like the marketplace with install on my device? (sorry for my humble language skill)
does no one have a clue or is it to simple? :D
'Is in touch' is not a user input event (from the browser's point of view). You need to request fullscreen in the 'On any touch start' trigger, otherwise the browser will ignore the request.
thanks for responding!
but sadly it doesnt work, at least not on FirefoxOS, Firefox for Android and Android standard browser.
it does work on Chrome for Android.
damn you Mozilla! ;)
unfortunately i want to make games that can be played on Android AND FirefoxOS in fullscreen <img src="smileys/smiley5.gif" border="0" align="middle" />
...fullscreen in Firefox for Android, yea. But you can do it in this way: Open your index file in a HTML editor like CoffeeCup and change the canvas line in something like this:
<canvas id="c2canvas" width="400" height="320" style="position: absolute; height: 100%; width: 100%; top: 0px; left: 0px;"></canvas>
Use your id, width and hight and you have your fullscreen in Firefox!
Thank you Roman!
but the bad browsers only said: "nice try, we stretch the canvas like you told us but we show the bars anyway <img src="smileys/smiley17.gif" border="0" align="middle" />"
and the badest of all, Firefox for Android, did, on top of that, only show 1/4 of the layout <img src="smileys/smiley18.gif" border="0" align="middle" />
but i wont give up, at least not now
am i the only one with that problem or do the rest just dont care?
with the help of some good guys i finally beat the Firefox and made the game installable and fullscreen <img src="smileys/smiley4.gif" border="0" align="middle" />
many thanks to Krzysztof Jankowski for pointing me here:
and many thanks to cvan of the mozilla irc channel for sorting out my noob failures :)
follow the documentation on that and beware of my failure:
the infos in package.manifest and the manifest.webapp have to be the same, for example in my files the App Name, Version and Developer entrys where different and so it refused to install.
and many thanks too, to Ashley, Roman and TGeorgeMihai for contributing here!