Is there anyway I can create mock sensor data on watch emulator? Like heart rate, acceleration, .etc. I have a real Gear Live, but want to make sure it works on round watches, and test there as well. Thanks
Yes, you can.
Use synthetic data providers to simulate sensor data from Health Services and test your app as though an exercise were really happening.
Considerations when using the emulator
When using the Wear OS emulator, there are two options available for generating simulated data:
Synthetic data providers: Offers extensive options for data generation. This is the covered throughout the rest of this page.
To use synthetic data providers on the emulator, ensure developer options are enabled.
Emulator extended controls: The emulator in Android Studio offers the extended controls panel, available by clicking the three dots in the button bar. From the extended controls, the developer can load in KML/GPX files to simulate location, or specify the behaviour of the heart rate sensor.
To use extended controls to generate data for health services, ensure that sensor providers are enabled.
Supported metrics
Synthetic data providers currently support the following metrics:
For more information please refer the following.
https://developer.android.com/training/wearables/health-services/synthetic-data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With