您好,登錄后才能下訂單哦!
傳感器共有的一些API
?sensorManager.registerListener?最后一個參數(shù)的值
?方法里已經(jīng)有詳細(xì)的注釋
????/**?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方法回調(diào)的參數(shù)
???/** ??????*?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即時數(shù)據(jù)的apk && 用gsensor來判斷手機(jī)的靜和動 - - ITeye博客
Android實戰(zhàn)技巧之四十二:加速度傳感器 - 懶人的技術(shù)筆記 - CSDN博客
每天一個adb命令:am 命令詳解 - 天森愛自由 - CSDN博客
在安卓中使用加速度傳感器 - 簡書
三軸傳感器、六軸傳感器、九軸傳感器的文章解讀 - penghejuan2012的博客 - CSDN博客
Android 獲取GPS速度 - Just do IT. - CSDN博客
Android系統(tǒng)Gps分析(一) - 莫回頭 - 博客園
??https://www.jianshu.com/p/8440a5897944?(詳細(xì)的介紹各種傳感器)
?
gsensor架構(gòu)和原理分析 - CSDN博客
Android調(diào)用傳感器和震動 - CSDN博客
Android-傳感器開發(fā)-方向判斷
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?(微信小程序方向監(jiān)聽Demo)
https://www.iteye.com/blog/justonecoder-1902143
Android getRotationMatrix和getOrientation原理
羅盤
https://www.cnblogs.com/time-mawei/p/4950408.html? ? (角度為負(fù)值的時候,需要處理一下,加上360度。)
https://github.com/ChaosOctopus/ChaosCompass?(小米羅盤自定義UI)
????? ? ?
?
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。