简体   繁体   English

如何使用标准API访问银河s5上的心率传感器?

[英]How can I access the heart rate sensor on my galaxy s5 using the standard apis?

Starting from How to access Galaxy S5 heart rate sensor? 如何访问Galaxy S5心率传感器开始? I tried to access the S5 heart rate monitor via android API (not Samsung health APIs) 我试图通过android API(不是Samsung health API)访问S5心率监视器

This other example, for samsung wear, https://gist.github.com/gabrielemariotti/d23bfe583e900a4f9276 does not work on S5. 对于三星设备,此另一个示例https://gist.github.com/gabrielemariotti/d23bfe583e900a4f9276在S5上不起作用。

In the meanwhile I listed all the available sensors on the S5 via code and found two interesting ones: 同时,我通过代码列出了S5上所有可用的传感器,并发现了两个有趣的传感器:

65561 MAX86900
65562 HRM Sensor

The S5 BOM says: S5 BOM说:

Biosensor (heart rate) – MFG: MAXIM INTEGRATED PRODUCTS INC – MPN: MAX86900 – 生物传感器(心率)– MFG:美心集成产品有限公司– MPN:MAX86900 –

Using 65561 as sensor ID I get some data (and it changes if I move my finger over the sensor). 使用65561作为传感器ID,我得到了一些数据(如果我将手指移到传感器上,它就会改变)。

Using 65562 I cannot get call to the callback. 使用65562我无法调用回调。

The other sensors I found: 我发现的其他传感器:

    1 MPU6500 Acceleration Sensor
    2 AK09911C Magnetic field Sensor
   14 AK09911C Magnetic Sensor UnCalibrated
    4 MPU6500 Gyroscope Sensor
   16 MPU6500 Uncalibrated Gyroscope Sensor
    8  TMG399X Proximity Sensor
    5 TMG399X RGB Sensor
   11 MPL Rotation Vector
   15 MPL Game Rotation Vector 
   18 SAMSUNG Step Detector Sensor
   19 SAMSUNG Step Counter Sensor
   17 SAMSUNG Significant Motion Sensor
65558 Screen Orientation Sensor
    3 Orientation Sensor
    9 Gravity Sensor
   10 Linear Acceleration Sensor

So, is there a way to access the heart rate monitor of the Galaxy S5 using only the standard APIs? 那么,有没有办法仅使用标准API来访问Galaxy S5的心率监视器?

Same question already asked: How to access Galaxy S5 heart rate sensor? 已经问过相同的问题: 如何访问Galaxy S5心率传感器?

"Use SensorManager.getDefaultSensor(65562) to get direct access to the HRM sensor." “使用SensorManager.getDefaultSensor(65562)直接访问HRM传感器。” by VD63 由VD63

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

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