-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passive Goals - Not getting Steps, Calories etc. Getting only Heart_rate #75
Comments
Hello Are you using the synthetic tracker on your emulator to generate the data? |
@garanj (1) to get data we need to request the type
(2) Synthetic data works only sometimes, not always. And if so, it can be seen in logcat only, not getting any data points inside the app Thanks in Advance |
Thanks, can you confirm which permissions you are requesting in your |
Thanks @garanj for your quick response Permissions:
..... Also please confirm if the below code is the right way to get multiple sensor datapoints: private val dataTypes = setOf(DataType.HEART_RATE_BPM, DataType.DAILY_CALORIES, ...... etc) private val passiveListenerConfig = PassiveListenerConfig(
) |
@garanj and Team Wear OS app collects heart rate, calories, distance, and steps in Passive Data mode. I am looking for a Passive Data Sample code that collects all the data points: heart rate, calories, distance, and steps. Please help Thanks, |
Thanks Harish, taking a look. Please bear with me I will aim to dive into this in the next day. |
Sure @garanj . Thank you |
@harishvgk I believe I can replicate your issue and am discussing it further internally. In order to unblock your development, do you have a physical device you are able to use instead of the emulator? And can you confirm whether you're seeing the issue on that device? |
@garanj I don't have a physical device. I can create a build, send it and get it tested in my Friend's watch. Other issue is, how to get more sensor data from this sample app? Here we are stuck up private val dataTypes = setOf(DataType.HEART_RATE_BPM) .... // Any option to add CALORIE, STEPS etc. Thanks, |
As well as specifying the permissions in the Manifest, are you also requesting them at runtime? (To help step past that issue for now and focus on the data issue, you can grant the app permission via You're correct, you need to add the dataTypes to that set. However, I too am experiencing an issue getting data back from PassiveMonitoringClient for data types other than Heart Rate, when using the emulator specifically, so we're looking at that in more depth now. |
Hi @harishvgk, looking at this issue, it appears that support in the synthetic tracker for producing Calories was not introduced until after the version of Health Services that is on the emulator: The version of Health Services on the emulator is unfortunately a bit old. This is not the first issue that has arisen because of the Health Services version on the emulator being somewhat old, and we are actively investigating how we can ensure it is updated and remains updated. In the interim, the immediate option, I'm afraid, is to do the testing on a physical device. We're exploring options and hopefully we'll have a better answer in due course. |
@garanj Thanks for the details shared. It's really helpful and informative. The ExerciseSample app running the Wear OS emulator is getting Calories along with the Heart rate per minute. I will try to use the app on a physical device and update you Thanks |
Hi @harishvgk An alternative that may work for you is to update the Health Services version via Play yourself on the emulator. The caveat I will add here is that if you are using a Mac with an M1 chip, then Play is not currently available on the Wear emulator, so this won't work. But if you are using a different device, then this is worth a try. You'll need to sign into Play on the watch and then use Play to upgrade the version of Health Services. Let me know if this unblocks you. Garan |
@garanj, I am getting the same issue here using my Samsung device. The Health Services app is updated on the device. But it only recognises the heart rate when I log this:- |
I'm having pretty much the same problem... I'm running on mine watch 5 |
Passive Goals - Not getting Steps, Calories etc. Getting only Heart_rate
Environment: Mac OSx - Android Studio IDE, Wear OS Emulator
Set daily calories - here private val dataTypes = setOf(DataType.HEART_RATE_BPM, DataType.DAILY_CALORIES)
class HealthServicesRepository(context: Context) {
......
......
But after that not get any data points on the onNewDataPointsReceived method.
class PassiveDataService : PassiveListenerService() {
}
Please help me to get heart rate, daily steps, daily calories, distance etc from PassiveData sample app with correct permissions, settings and flows required
Thanks in Advance
The text was updated successfully, but these errors were encountered: