Showing posts with label heart. Show all posts
Showing posts with label heart. Show all posts

Thursday, 15 October 2015

Heart Rate Tracking while on the Charger



Has anyone else noticed that the watch keeps tracking heart rate while on the charger ? Also, it tends to report a really high heart rate. I have the data from Moto Body synced to Google Fit so that I can look at the hourly graph and see what was reported. I rest around 50-60 BPM, but over night when it's on the charger it reports 70-100+.

Anyone know if there is a way to disable the heart rate tracking while the device in charging ?



Thursday, 8 October 2015

Continuous heart rate monitoring?



Does this watch support continuous heart rate monitoring during exercise or throughout the day? I have seen conflicting information regarding this feature, some saying that it works in S-Health and Nike+ and others saying you have to manually check each time you want a reading.



Tuesday, 6 October 2015

Heart Sensor/Passive Wellness sensor



Hello dear forum members,

As far as I know , moto360 doesn't have a sensor of type : TYPE_HEART_RATE, it's called passive wellness sensor.
The problem is that this wellness sensor is not giving me any data, as opposed to every other sensor that I've tried (like gravity, accelerometer...)
I've been waiting for more than 5 min but this sensor gives me data only when I start the app.
I've tried sdk20,sdk21,sdk22,sdk23 ... still no result I also have the android.permission.BODY_SENSORS in my manifest

Question : How to get the sensor working, what can I do?


Code:


package com.x.firstapp;

import android.app.Activity;
import android.os.Bundle;
import android.support.wearable.view.WatchViewStub;
import android.util.Log;
import android.widget.Toast;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.view.WindowManager;


public class MainActivity extends Activity implements SensorEventListener {
private SensorManager mSensorManager;
private Sensor mHeartSensor;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
    stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
        @Override
        public void onLayoutInflated(WatchViewStub stub) {
        }
    });

    // keep watch screen on
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    Toast.makeText(getApplicationContext(), "Hi Oleg", Toast.LENGTH_LONG).show();


    mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
    mHeartSensor = mSensorManager.getDefaultSensor(65538); //wellness sensor
    mSensorManager.registerListener(this, mHeartSensor, SensorManager.SENSOR_DELAY_NORMAL);

}


public void onSensorChanged(SensorEvent event) {
    if (event.sensor.getType() == 65538) {
        String msg = "" + (int) event.values[0];
        Log.d("Main Activity", msg);
    }
}

@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
    Log.d("Main Activity", "accuracy : " + accuracy + " sensor : " + sensor.getName());
}

@Override
protected void onStop() {
    super.onStop();
    mSensorManager.unregisterListener(this);
}


only output out of this "wellness" sensor (only when app starts) :

D/Main Activity: accuracy : 3 sensor : Wellness Passive Sensor

D/Main Activity: 0

I have also posted this question on stack overflow, but so far - no success.
As soon as I get an answer here I'll spread it on stack overflow as well.

Thank you :)