Hi, I need to make a React native cross platform app where i want to integrate samsung wearable to communicate with , and get health data i.e steps, heart rate etc. how to do any sdk or Api that Samsung provide Note: i don’t want to make a wearable app i need to communicate with watch only to get data? Can someone help me
Not Samsung but Android does it is called Health Connect
Samsung engineers have created several Blogs on connecting with Health Connect
Hope this helps
Ron
Samsung Developer Relations
Hello MaximTimeClock@auvgffle,
Integrating a Samsung wearable with a React Native app to fetch health data like steps and heart rate involves using the appropriate SDKs provided by Samsung. While you’re not looking to develop a wearable app, you will still need to use the Samsung Accessory SDK to establish communication between the wearable device and your app.
The Samsung Accessory SDK allows you to connect Galaxy Watch devices to host devices, which in your case would be the React Native app. With this SDK, you can define a new service between the Galaxy Watch and the host device, enabling you to use various functions from the Galaxy Watch device.
Here’s a high-level overview of the steps you might follow:
Set up the Samsung Accessory SDK: Download and set up the Samsung Accessory SDK in your development environment.
Define a Service Profile: Create a service profile that specifies the type of connection and data you want to exchange with the wearable.
Implement Communication Logic: Use the APIs provided by the Accessory SDK to send and receive data from the wearable.
Handle Data: Once the data is received in your app, you can process it as needed, such as displaying steps or heart rate information.
For React Native specifically, you may need to create a bridge module that wraps the native SDK functionality into a format that can be used within your React Native code. This often involves writing some native code for both Android and iOS.
Additionally, there’s a project on GitHub named “React Native Wearables” that aims to provide a common interface for accessing wearables data on each platform, which might be helpful for your use case.
Please note that while the Accessory SDK is meant for creating companion apps, it should also facilitate the data communication you’re looking for.
I hope this will help You.
Thank you very much for your valuable answer. I need to clarify, does the Accessory SDK require a Samsung watch app to communicate with my app? I tried using React Native Wearables, but unfortunately, it didn’t work for my case. I need to read data from a Samsung watch or the S Health app, but it seems they do not provide access to third-party applications.
For Wear OS, do I still need an app on Wear OS watches to facilitate communication between Wear OS and my app?
See this blog Accessing Samsung Health Data Through Health Connect
Ron
Samsung Developer Relations