您好,登錄后才能下訂單哦!
傳感器共有的一些API
?sensorManager.registerListener?最后一個參數的值
?方法里已經有詳細的注釋
????/**?get?sensor?data?as?fast?as?possible?*/ ????public?static?final?int?SENSOR_DELAY_FASTEST?=?0; ????/**?rate?suitable?for?games?*/ ????public?static?final?int?SENSOR_DELAY_GAME?=?1; ????/**?rate?suitable?for?the?user?interface??*/ ????public?static?final?int?SENSOR_DELAY_UI?=?2; ????/**?rate?(default)?suitable?for?screen?orientation?changes?*/ ????public?static?final?int?SENSOR_DELAY_NORMAL?=?3;
onAccuracyChanged方法回調的參數
???/** ??????*?The?values?returned?by?this?sensor?cannot?be?trusted?because?the?sensor ??????*?had?no?contact?with?what?it?was?measuring?(for?example,?the?heart?rate ??????*?monitor?is?not?in?contact?with?the?user). ??????*/ ????public?static?final?int?SENSOR_STATUS_NO_CONTACT?=?-1; ????/** ?????*?The?values?returned?by?this?sensor?cannot?be?trusted,?calibration?is ?????*?needed?or?the?environment?doesn't?allow?readings ?????*/ ????public?static?final?int?SENSOR_STATUS_UNRELIABLE?=?0; ????/** ?????*?This?sensor?is?reporting?data?with?low?accuracy,?calibration?with?the ?????*?environment?is?needed ?????*/ ????public?static?final?int?SENSOR_STATUS_ACCURACY_LOW?=?1; ????/** ?????*?This?sensor?is?reporting?data?with?an?average?level?of?accuracy, ?????*?calibration?with?the?environment?may?improve?the?readings ?????*/ ????public?static?final?int?SENSOR_STATUS_ACCURACY_MEDIUM?=?2; ????/**?This?sensor?is?reporting?data?with?maximum?accuracy?*/ ????public?static?final?int?SENSOR_STATUS_ACCURACY_HIGH?=?3;
1.加速度傳感器
顯示gsensor即時數據的apk && 用gsensor來判斷手機的靜和動 - - ITeye博客
Android實戰技巧之四十二:加速度傳感器 - 懶人的技術筆記 - CSDN博客
每天一個adb命令:am 命令詳解 - 天森愛自由 - CSDN博客
在安卓中使用加速度傳感器 - 簡書
三軸傳感器、六軸傳感器、九軸傳感器的文章解讀 - penghejuan2012的博客 - CSDN博客
Android 獲取GPS速度 - Just do IT. - CSDN博客
Android系統Gps分析(一) - 莫回頭 - 博客園
??https://www.jianshu.com/p/8440a5897944?(詳細的介紹各種傳感器)
?
gsensor架構和原理分析 - CSDN博客
Android調用傳感器和震動 - CSDN博客
Android-傳感器開發-方向判斷
https://blog.csdn.net/liang5630/article/details/42421897
https://blog.csdn.net/weixin_37730482/article/details/80571085??(指南針就是利用方向傳感器的第一個返回值)
https://blog.csdn.net/jackjia2015/article/details/88185683?(微信小程序方向監聽Demo)
https://www.iteye.com/blog/justonecoder-1902143
Android getRotationMatrix和getOrientation原理
羅盤
https://www.cnblogs.com/time-mawei/p/4950408.html? ? (角度為負值的時候,需要處理一下,加上360度。)
https://github.com/ChaosOctopus/ChaosCompass?(小米羅盤自定義UI)
????? ? ?
?
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。