简体   繁体   English

什么设备支持Android传感器批处理?

[英]What devices support Android Sensor Batching?

KitKat introduced sensor batching but I could not find a list of devices that support this. KitKat引入了传感器批处理,但我找不到支持此功能的设备列表。 In particular I am interested whether the 2013 HTC One supports it. 特别是我对2013 HTC One是否支持它感兴趣。

Is there a (community maintained?) resource that lists the supported devices? 是否有(社区维护?)资源列出支持的设备?

If sensor batching is not available on the HTC One, are there any good low-power gps tracking libraries? 如果HTC One上没有传感器批处理,那么有没有好的低功耗gps跟踪库? I would love to not have to write my own geofencing code (I assume this would be the most power-saving way to track the phone location) 我希望不必编写自己的地理围栏代码(我认为这将是追踪手机位置最省电的方式)

Thanks 谢谢

Using this code: 使用此代码:

SensorManager mgr = (SensorManager) getSystemService(SENSOR_SERVICE);
Sensor accelerometer = mgr.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
int fifoSize = accelerometer.getFifoReservedEventCount();
if (fifoSize > 0) {
    //Device supports batched sensor updates
}

in an Activity that implemented a SensorEventListener. 在实现SensorEventListener的Activity中。 I found the following devices supported batched sensor updates: 我发现以下设备支持批量传感器更新:

  1. Nexus 5 running Android 4.4.4 Nexus 5运行Android 4.4.4
  2. Nexus 6 running Android 5.0.1 Nexus 6运行Android 5.0.1
  3. Samsung Galaxy S5 (G900F Europe variant) running Android 5.0 三星Galaxy S5(G900F欧洲版)运行Android 5.0
  4. Samsung Galaxy Note 3 (SM-N9005) running Android 4.4.2 三星Galaxy Note 3(SM-N9005)运行Android 4.4.2
  5. Samsung Galaxy Note 4 (SM-N910F) running Android 4.4.4 三星Galaxy Note 4(SM-N910F)运行Android 4.4.4
  6. Nexus 5X running Android 6.0 Nexus 5X运行Android 6.0
  7. Nexus 6P running Android 7.0 Nexus 6P运行Android 7.0
  8. Google Pixel running Android 7.1 Google Pixel运行Android 7.1
  9. Samsung Galaxy S7 Edge (SM-G935F) running Android 6.0.1 三星Galaxy S7 Edge(SM-G935F)运行Android 6.0.1
  10. Samsung Galaxy S7 (SM-G930F) running Android 6.0.1 三星Galaxy S7(SM-G930F)运行Android 6.0.1
  11. Sony Xperia XZ running Android 6.0.1 索尼Xperia XZ运行Android 6.0.1
  12. Oneplus 3T running Android 6.0.1 Oneplus 3T运行Android 6.0.1
  13. Samsung Galaxy S8 (SM-G950F) running Android 7.0 三星Galaxy S8(SM-G950F)运行Android 7.0
  14. LG G6 (LG-H870) running Android 7.0 LG G6(LG-H870)运行Android 7.0
  15. Sony Xperia XZ Premium (G8141) running Android 7.1.1 索尼Xperia XZ Premium(G8141)运行Android 7.1.1
  16. Oneplus 5 running Android 7.1.1 Oneplus 5运行Android 7.1.1
  17. Google Pixel 2 running Android 8.0 Google Pixel 2运行Android 8.0

and these did not: 而这些没有:

  1. Moto G 1st gen 4G (XT1039) running Android 4.4.4 运行Android 4.4.4的Moto G 1st gen 4G(XT1039)
  2. HTC One M8 running Android 5.0.1 HTC One M8运行Android 5.0.1
  3. Nexus 9 running Android 5.0.1 Nexus 9运行Android 5.0.1
  4. Nvidia Shield Tablet running Android 5.0.1 运行Android 5.0.1的Nvidia Shield Tablet
  5. Nexus 4 running Android 5.0.1 Nexus 4运行Android 5.0.1
  6. Sony Xperia Z running Android 4.4.2 索尼Xperia Z运行Android 4.4.2
  7. Sony Xperia Z3 compact running Android 5.0.2 索尼Xperia Z3紧凑型运行Android 5.0.2
  8. One Plus Two running Android 5.1.1 One Plus Two运行Android 5.1.1
  9. LG G5 SE (LG-H840) running Android 6.0.1 LG G5 SE(LG-H840)运行Android 6.0.1
  10. Amazon Kindle Fire 7 (7th gen) running Android 5.1.1 亚马逊Kindle Fire 7(第7代)运行Android 5.1.1

Sorry :(. I will update with more devices when I get my hands on them 抱歉:(。当我拿到手时,我会更新更多设备

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM