Access accelerometer via Javascript in Android?

前端 未结 6 577
夕颜
夕颜 2020-12-02 23:51

Is there any way to access accelerometer data using Javascript on Android\'s browser? I know it supports \"onorientationchange\", but I\'d like to get everything.

C

6条回答
  •  [愿得一人]
    2020-12-03 00:25

    Looking at this post flash.sensors.Accelerometer on Android within web browser it seems accelerometer data is available to flash. So a possible workaround (at least for devices which have flash) would be a small flash applet which grabbed the data for you.

    Sounds like a hack, but still sounds better than making the whole thing in flash

提交回复
热议问题