JS-傳感器
BSL.StartAccelerate('callbackMethod')
調用后加速計開始運行,一直返回數據直到主動停止或者關閉應用。返回數據為json字符串例子:{"x":"0.31543522","y":"0.42968523","z":"9.29485267"}
<script type="text/javascript"> function accelerateData(r){ alert('xxxxx'); }</script><a href="#" onclick="BSL.StartAccelerate('accelerateData')">開啟加速計</a>
BSL.StopAccelerate()<a href="#" onclick="BSL.StopAccelerate()">關閉加速計</a>
BSL.StartGyro('callbackMethod')
調用后陀螺儀開始運行,一直返回數據直到主動停止或者關閉應用。返回數據為json字符串例子:{"x":"-0.17491333","y":"-0.42968523","z":"0.00491333"}
<script type="text/javascript"> function gyroData(r){ alert('xxxxx'); }</script><a href="#" onclick="BSL.StartGyro()('gyroData')">開啟陀螺儀</a>
BSL.StopGyro()<a href="#" onclick="BSL.StopGyro()">關閉陀螺儀</a>
2020-03-05 10:00:04
熱門App插件
猜你喜歡
咨詢 . 試用
咨詢 . 試用