setSyncNotificationContent function
Experimental API
On iOS, this method is a no-op. iOS does not require apps to show a user-visible
notification when performing extended work in background.
Overview
Set the text content related to the Sync Notification. The OS has full discretion to present this notification to the user, when any data sync work in background is taking longer than expected.
Refer to the Vital Health Connect guide for full context and setup instructions.
Implementation
Future<void> setSyncNotificationContent(SyncNotificationContent content) async {
if (!Platform.isAndroid) {
// iOS background delivery does not require user explicit consent.
// It requires only the app-level HealthKit Bgnd. Delivery entitlement.
return;
}
return await VitalHealthPlatform.instance.setSyncNotificationContent(content);
}