JS-傳感器
BSL.StartAccelerate('callbackMethod')
調(diào)用后加速計開始運行,一直返回數(shù)據(jù)直到主動停止或者關(guān)閉應(yīng)用。返回數(shù)據(jù)為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()">關(guān)閉加速計</a>
BSL.StartGyro('callbackMethod')
調(diào)用后陀螺儀開始運行,一直返回數(shù)據(jù)直到主動停止或者關(guān)閉應(yīng)用。返回數(shù)據(jù)為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()">關(guān)閉陀螺儀</a>
2020-03-05 10:00:04
熱門App插件
猜你喜歡
咨詢 . 試用
客服電話:400-876-0081
優(yōu)惠活動、領(lǐng)取優(yōu)惠券、公告消息等
咨詢 . 試用