-
public interface IBackgroundServiceImplement and provide this interface as part of service registration to indicate the service wants to be instantiated and its backgroundRun function called when the app is in the background. Each background service's scheduleBackgroundRunIn will be analyzed to determine when backgroundRun should be called.
-
-
Method Summary
Modifier and Type Method Description abstract UnitbackgroundRun()Run the background service. abstract LonggetScheduleBackgroundRunIn()When this background service should be run, in milliseconds. -
-
Method Detail
-
backgroundRun
@WorkerThread() abstract Unit backgroundRun()
Run the background service. WARNING: This may not follow your scheduleBackgroundRunIn schedule: 1. May run more often as the lowest scheduleBackgroundRunIn value is used across the SDK. 2. Android doesn't guarantee exact timing on when the job is run, so it's possible for it to be delayed by a few minutes.
-
getScheduleBackgroundRunIn
abstract Long getScheduleBackgroundRunIn()
When this background service should be run, in milliseconds. If null, this service does not need to be run in the background.
-
-
-
-