Tasks

interface Tasks

Interface for observing state of background task.

Task perform several actions:

  • Download, upload and merge data from wristband and server.

  • Install firmware.

  • Provide an up-to-date information about wristband state.

Functions

Link copied to clipboard
abstract fun checkFirmwareAvailable(): Single<FirmwareSummary>

Ask server about availability of new firmwares.

Link copied to clipboard
abstract fun isFastSyncEnabled(): Single<Boolean>

Returns Single that emits information about Fast Sync enabled/disabled state.

Link copied to clipboard
abstract fun observeFirmwareAvailable(): Observable<FirmwareSummary>

Returns Observable that emits information about availability of new firmwares.

Link copied to clipboard
abstract fun observeSensorState(): Observable<SensorState>

Returns Observable that emits wristband state.

Link copied to clipboard
abstract fun observeServiceInfo(): Observable<ServiceInfo>

Returns Observable that emits information about wristband.

Link copied to clipboard
abstract fun observeSyncProgress(): Observable<Int>

Returns Observable that emits progress of synchronization from 0 to 100 percent.

Link copied to clipboard
abstract fun observeSyncState(): Observable<SyncState>

Returns Observable that emits state of synchronization.

Link copied to clipboard
abstract fun observeTasksState(): Observable<TasksState>

Returns Observable that emits state of background tasks.

Link copied to clipboard
abstract fun setFastSync(isEnabled: Boolean): Completable

Update Fast Sync enabled/disabled state. New value will be applied on next synchronization.

Link copied to clipboard
abstract fun syncWeight(): Completable

Start weights and weight goals synchronization right now.