Reputation: 340
We are working on a project about health care and we implemented an android app. now we want to integrate with smart watches that supports android wear or Tizen OS, the question is can we integrate with android wear SDK or Tizen SDK and read data from the watch like steps and heart rate without making apps on android wear or Tizen
Thanks in advance.
Upvotes: 10
Views: 13279
Reputation: 45
I think your watch can send data to any fitness app connected to Health Connect. You can then pull this data from Health Connect into your own App.
If you use Android 14, there isnt even much to setup as it is part of the Android framework.
For Android 13 and lower you wold need to install the App first through the App store.
You should also be familiar with the Health Connect SDK and add the dependency to your build.gradle:
dependencies {
...
implementation "androidx.health.connect:connect-client:1.1.0-alpha02"
...
}
After that you can easily configure your app to make it work.
Upvotes: 1
Reputation: 6729
To help you started, you can see this site for the introduction.
Android Wear is a lightweight platform that connects to the wearer’s body and provides the right information at the right time. Wear makes it easy for users to be more connected to both the online and real worlds by making important information available at a glance and allowing users to complete tasks quickly.
For further reference you can also explore the Google Fit documentation.
From there you will learn about the features that you may be looking.
The Google Fit APIs for Android are part of Google Play services and are supported in Android 2.3 (API level 9) and higher. Google Fit on Android consists of these APIs:
- The Sensors API provides access to raw sensor data streams from sensors available on the Android device and from sensors available in companion devices, such as wearables.
- The Recording API provides automated storage of fitness data using subscriptions. Google Fit stores fitness data of the specified types in the background and persists app subscriptions.
- The History API provides access to the fitness history and lets apps perform bulk operations, like inserting, deleting, and reading fitness data. Apps can also import batch data into Google Fit.
- The Sessions API provides functionality to store fitness data with session metadata. Sessions represent a time interval during which users perform a fitness activity.
- The Bluetooth Low Energy API provides access to Bluetooth Low Energy sensors in Google Fit. This API enables your app to look for available BLE devices and to store data from them in the fitness store.
- The Config API provides custom data types and additional settings for Google Fit. For more information, see Custom Data Types and Disconnect from Google Fit.
Google Fit includes support for sensors on the mobile device and Bluetooth Low Energy sensors paired with the device. Google Fit lets developers implement support for other sensors and expose them as software sensors in Android apps. Sensors supported by Google Fit are available to Android apps as data source objects.
Use the Sensor API to count the steps in Android Wear using the Step Counter Sensor.
private SensorManager mSensorManager;
private Sensor mSensor;
...
mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);
For Tizen, you can check the design principle that was provided in their site.
Upvotes: -1
Reputation: 594
I think you can. At least Android Wear has Google Fit API. Don't really know about Tizen.
Upvotes: 2