@ovok/native/next/background-sync

Background sync helpers for `@ovok/native/next`.

  • Stable unknown
  • Release candidate not available
  • Development not available

Background sync helpers for @ovok/native/next.

Import from @ovok/native/next/background-sync.

Functions

cancelOfflineMeasurementBackgroundSync()

function cancelOfflineMeasurementBackgroundSync(): Promise<void>;

Cancels recurring offline measurement sync.

Returns

Promise<void>


registerOfflineMeasurementBackgroundTask()

function registerOfflineMeasurementBackgroundTask(restoreClient): void;

Defines the task at app entry-point load so it exists after process restart. The callback must restore the app-owned client and its secure session.

Parameters

ParameterType
restoreClient() => Promise<OfflineMeasurementBackgroundSyncClient>

Returns

void


runOfflineMeasurementBackgroundSync()

function runOfflineMeasurementBackgroundSync(client): Promise<OfflineMeasurementFlushResult>;

Flushes the Core offline measurement queue for a restored client.

Parameters

Returns

Promise<OfflineMeasurementFlushResult>


scheduleOfflineMeasurementBackgroundSync()

function scheduleOfflineMeasurementBackgroundSync(options?): Promise<void>;

Schedules recurring offline measurement sync through WorkManager or BGTaskScheduler.

Parameters

Returns

Promise<void>

Type Aliases

OfflineMeasurementBackgroundSyncClient

type OfflineMeasurementBackgroundSyncClient = Pick<Ovok, "measurements">;

Core client surface used by the background queue flush.


OfflineMeasurementBackgroundSyncOptions

type OfflineMeasurementBackgroundSyncOptions = object;

Options for recurring offline measurement sync.

Properties

minimumIntervalMinutes?
minimumIntervalMinutes?: number;

Minimum repeat interval in minutes (15 or higher); defaults to 15.

References

ANDROID_HEALTH_CONNECT_BACKGROUND_TASK

Re-exports ANDROID_HEALTH_CONNECT_BACKGROUND_TASK


AndroidBluetoothForegroundService

Re-exports AndroidBluetoothForegroundService


AndroidBluetoothForegroundServiceOptions

Re-exports AndroidBluetoothForegroundServiceOptions


AndroidHealthConnectBackgroundSyncOptions

Re-exports AndroidHealthConnectBackgroundSyncOptions


AndroidHealthConnectBackgroundTask

Re-exports AndroidHealthConnectBackgroundTask


AndroidHealthConnectSyncRunOptions

Re-exports AndroidHealthConnectSyncRunOptions


BackgroundSafeClientStorage

Re-exports BackgroundSafeClientStorage


BackgroundSafeSecureStore

Re-exports BackgroundSafeSecureStore


BackgroundSafeStorageOptions

Re-exports BackgroundSafeStorageOptions


cancelAndroidHealthConnectSync

Re-exports cancelAndroidHealthConnectSync


createBackgroundSafeClientStorage

Re-exports createBackgroundSafeClientStorage


getPushNotificationPermission

Re-exports getPushNotificationPermission


isAndroidBatteryOptimizationIgnored

Re-exports isAndroidBatteryOptimizationIgnored


PushNotificationContent

Re-exports PushNotificationContent


PushNotificationPermissionStatus

Re-exports PushNotificationPermissionStatus


registerAndroidHealthConnectBackgroundTask

Re-exports registerAndroidHealthConnectBackgroundTask


requestAndroidBatteryOptimizationExemption

Re-exports requestAndroidBatteryOptimizationExemption


requestPushNotificationPermission

Re-exports requestPushNotificationPermission


runAndroidHealthConnectSync

Re-exports runAndroidHealthConnectSync


scheduleAndroidHealthConnectSync

Re-exports scheduleAndroidHealthConnectSync


showPushNotification

Re-exports showPushNotification


startAndroidBluetoothForegroundService

Re-exports startAndroidBluetoothForegroundService


stopAndroidBluetoothForegroundService

Re-exports stopAndroidBluetoothForegroundService

Last updated on

On this page