Is it work? Device motion function In HTML5 Game?

I’m sure i can use detecting device motion function in Android or IOS APP
But if i make that game and export via html5.
And if user play with HTML5, Then Can user use device motion??
Thanks for your help
(I’ve tested it but i can’t, then is there any other way can use them in HTML5?)

I tried the ball game example on my phone in web preview, it works.

Does it depend on mobile setting?
My phone doesn’t work in web…
I tried this, “Device orientation ballgame”

Phone sensors stil dont work. I issued this problem on 19 december 2019. But there is no fix yet. (Not html5 game though, it was an Android export.)

I hope they fix it soon. Im now in the point of development that i really need this function. I really hoped that it was fixed by now.

Link to post :

Maybe try another web browser? I tested on Firefox, I think.
Maybe also a matter of permissions depending on the OS? I’m on Android 8.

@Fabriekzus The permissions are automatic. When a game/app tries to access a function (it calls a library), the system knows it. If an app called the phone library, the system would know it and would ask for permission to access the phone functions. Orientation/vibration don’t need permissions for apk, I think.
But for example, in my new game, I get a permission request for vibration, because it’s a web page.

@Gruk Hmm, i’m a little bit confused right now.

There is a bug report on github :


In this post they say, maybe we have to ask premission. So i think that is the problem then.

It didnt work back then. Maybe there was a fix? But it doesnt seem to be solved on github.

Edit : I Also dont get a premission menu for vibration in your game. I played to level 3 but didnt feel a vibration. Is it later in the game? Cool concept btw.

Im currently on a iPhone 6s using Chrome browser.

P.s When testing my game, a Android phone with an apk file.

Bouh says it works on Firefox but not on Chrome, which confirms my experience. :slight_smile:
Well I guess it’s not fixed, or this topic wouldn’t exist. :smile:

1 Like