krokyze / FitKit

Flutter plugin for reading health and fitness data. Wraps HealthKit on iOS and GoogleFit on Android.
BSD 2-Clause "Simplified" License
98 stars 72 forks source link

[iOS] HeathKit - background delivery #10

Open fvisticot opened 4 years ago

fvisticot commented 4 years ago

Is it possible with the plugin to get data even when app is in background. This feature is required for my use case. It seems possible as describe in this post: [https://stackoverflow.com/questions/26375767/healthkit-background-delivery-when-app-is-not-running]

krokyze commented 4 years ago

Hey, currently you can only use it foreground.

AmitaiMazliah commented 4 years ago

Is it possible with the plugin to get data even when app is in background. This feature is required for my use case. It seems possible as describe in this post: [https://stackoverflow.com/questions/26375767/healthkit-background-delivery-when-app-is-not-running]

You can use my fork https://github.com/AmitaiMazliah/FitKit it's still a work in progress and only implemented for iOS.

for android you can combine it with https://pub.dev/packages/background_fetch and it works perfect

W2YAdmin commented 4 years ago

Hi @AmitaiMazliah ,

Does your fork support background fetch? I have the Android part working great using background_fetch but facing crashes on IOS.

Do I just need to replace the fit_kit I have with your fork? Are there any other changes needed?