HTML5 Portrait on android

0 favourites
  • 8 posts
From the Asset Store
Jump on the mole rats and see how far you can go!
  • Hello

    I have a problem here:

    I have a HTML5 web application running, access it with a PC and a smartphone (android), I would when I acess whith a smartphone him to stay fixed in portrait orientation , I can do this ?

    I'm trying to do it for there are several text boxes on the application and when I access it by a smartphone , the default keyboard takes over the entire screen, in portait it picks up the black bottom, if you have a solution to this would also be interesting

    thanks

  • In Chrome for Android, the project 'Orientations' property is respected, but only after you request fullscreen with the Browser object. Also note you can only request fullscreen in an input trigger, e.g. 'On sprite touched' or 'On any touch start'.

  • This work just with the Chrome?

    anyway, I could not make it work

    im using:

    on start of layout - request fullscreen

    Browser is full screem - lock orientation to portrait

    oriantation property is portrait also

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 'On start of layout' is not an input trigger. It has to be an action initiated by the user, otherwise the browser ignores the request. You also don't need the other event to lock orientation, Construct 2 does that automatically if the project orientations property is set.

  • Yeah, for Chrome worked perfectly

    have any way for other browsers?

    Thanks a lot

  • AFAIK in other browsers, you cannot curenttly force it (as they did not yet implement this feature), you could detect if it is portrait or landscape, depending on the result, suggesting to the user to rotate their device for a better experience.

    Also not all smartphones (I think) have a keyboard that covers the entire screen on landscape mode.

  • I think it's also supported on Firefox for Android and IE11 on Windows Phone 8.1, but Safari on iOS and the Android stock browser on old Androids don't support it.

  • hum, okay , I'll find some other solution to the keyboard and landscape, Thank you for your attention

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)