DittoForegroundServiceManager

Starts and stops DittoForegroundService

A foreground service allows your app to continue syncing data with Ditto while running in the background.

When ditto.startSync() is called, this class does the following:

  1. Searches in AndroidManifest.xml for a foreground service that implements DittoForegroundService

  2. Verifies that the application has the required permissions to start a foreground service

  3. Starts the foreground service

When ditto.stopSync() is called, this class stops the running foreground service.

Constructors

Link copied to clipboard
constructor(context: Context)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun start()
Link copied to clipboard
fun stop()