傳感器共有的一些API
成都創(chuàng)新互聯(lián)公司專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、陵水黎族網(wǎng)絡(luò)推廣、小程序定制開發(fā)、陵水黎族網(wǎng)絡(luò)營銷、陵水黎族企業(yè)策劃、陵水黎族品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們最大的嘉獎(jiǎng);成都創(chuàng)新互聯(lián)公司為所有大學(xué)生創(chuàng)業(yè)者提供陵水黎族建站搭建服務(wù),24小時(shí)服務(wù)熱線:18982081108,官方網(wǎng)址:www.cdcxhl.com
?sensorManager.registerListener?最后一個(gè)參數(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í)數(shù)據(jù)的apk && 用gsensor來判斷手機(jī)的靜和動(dòng) - - ITeye博客
Android實(shí)戰(zhàn)技巧之四十二:加速度傳感器 - 懶人的技術(shù)筆記 - CSDN博客
每天一個(gè)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)用傳感器和震動(dòng) - CSDN博客
Android-傳感器開發(fā)-方向判斷
https://blog.csdn.net/liang5630/article/details/42421897
https://blog.csdn.net/weixin_37730482/article/details/80571085??(指南針就是利用方向傳感器的第一個(gè)返回值)
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ù)值的時(shí)候,需要處理一下,加上360度。)
https://github.com/ChaosOctopus/ChaosCompass?(小米羅盤自定義UI)
????? ? ?
?