Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having trouble reading heart rate sensor from Moto 360 - Android Wear

Has anyone successfully read the heart rate sensor from the Moto 360?

mSensorManager = ((SensorManager)getSystemService(SENSOR_SERVICE));
mHeartRateSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE);

I am getting an error that states "SensorManager﹕ sensor or listener is null"

I know the Gear Live uses a different ID other than Sensor.TYPE_HEART_RATE...I'm wondering if that's the case with the Moto 360.

I tried a sensor value of 65538 which reports itself as a "Wellness Sensor" but that does not appear to return data either.

Any advice would be appreciated.

like image 622
dcarr622 Avatar asked Sep 29 '22 21:09

dcarr622


1 Answers

I am doing the same on my Moto 360 and I get the sensor and the heart rate. Did you put the permission for the body data:

uses-permission android:name="android.permission.BODY_SENSORS"

in your Manifest.xml?

like image 184
beja80 Avatar answered Oct 03 '22 02:10

beja80