Accelerometer problems in chrome mobile (but not firefox)

0 favourites
  • 5 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Problem Description

    Android Chrome doesn't read XYZ acceleration values (with or without G), but DOES read Alpha, Beta and Gamma.

    The android device is obviously equipped with an accelerometer, which is testable because Firefox works fine.

    It also seems to affect cordova and phonegap, so maybe a chromium problem? I don't know their infrastructure.

    Attach a Capx

    https://www.dropbox.com/s/ytsctdvg3s4f4z5/bug.capx?dl=0

    Description of Capx

    This capx prints out X acceleration and Gamma

    Steps to Reproduce Bug

    • Step 1 run it on an android device using chrome
    • Step 2 run it on an android device using firefox

    Observed Result

    Chrome doesn't read accelerometer data. Firefox does. Both read gamma

    Expected Result

    Chrome should read accelerometer data

    Affected Browsers

    • Chrome: (YES/NO)
    • FireFox: (YES/NO)
    • Internet Explorer: (YES/NO)

    Operating System and Service Pack

    Windows 10 10.0.16299 build 16299, but doesn't really matter because construct 3 does the exact same and C3 is OS independent innit?

    Construct 2 Version ID

    v255

  • What device is it specifically? A similar type of issue has come up in the past where the device doesn't actually have an accelerometer sensor. In that case some browsers, but not others, try to emulate an accelerometer via the other sensors. So you'd just be seeing the difference between which browsers do this emulation.

  • Thanks for the reply Ashley. It's a Xiaomi Redmi Note 4X

    https://www.gsmarena.com/xiaomi_redmi_note_4x-8580.php

    Fingerprint (rear-mounted), accelerometer, gyro, proximity, compass

    It's not entry level and absolutely does have an accelerometer.

    Other proof is that the same device *used* to work with chrome a month ago, and the same device apparently works with Chrome Canary and Chrome Dev, just tested. Just not the vanilla chrome and phonegap build.

    Should I be bugging chromium devs instead? It's a little maddening.

    Also I take it the capx works for you on your test device?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Other proof is that the same device *used* to work with chrome a month ago, and the same device apparently works with Chrome Canary and Chrome Dev, just tested.

    Well, that sounds like a Chrome bug that just got fixed then - so it just means waiting for the fix to make its way down to the stable channel.

  • Thank you Ashley! You can close this <3

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