Retrieve step count and sleep data for a flutter based project on Android and iOS

1.3k Views Asked by At

I'm working on an application in health & fitness space and one of the requirement is to retrieve activities data (step count and sleep data to begin with) from wearables.

My understanding is that I will be able to get this data from Google Fit and Apple Health. I'm confused on to choose flutter package or to use native libraries with platform specific implementation

Option 1 - Flutter package:

  • There is a package called Health (https://pub.dev/packages/health). It is a wrapper built around Google Fit, Health Connect for Android and HealthKit for iOS.

  • I'm concerned about the reliability and security of this package as this is not flutter favourite.

  • Has anyone used this package here in this community? If yes, please share your feedback.

Option 2 - Native approach:

Please suggest which one would be the better option or any other approach I'm missing..

1

There are 1 best solutions below

2
On

the Health package is good and you can use it in general. The best solution would be to take steps from the pedometer package(https://pub.dev/packages/pedometer) for Android and Ios, because it will give you real-time data. For sleep data, use Health