mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 19:05:56 +03:00
updating background sync function docs with more information
This commit is contained in:
parent
56d5a38e80
commit
c14ffefe7c
2 changed files with 7 additions and 5 deletions
|
@ -120,9 +120,11 @@ interface Session :
|
|||
fun requireBackgroundSync()
|
||||
|
||||
/**
|
||||
* Launches infinite self rescheduling background syncs
|
||||
* This does not work in doze mode :/
|
||||
* If battery optimization is on it can work in app standby but that's all :/
|
||||
* Launches infinite self rescheduling background syncs via the WorkManager
|
||||
*
|
||||
* While dozing, syncs will only occur during maintenance windows
|
||||
* For reliability it's recommended to also start a long running foreground service
|
||||
* along with disabling battery optimizations
|
||||
*/
|
||||
fun startAutomaticBackgroundSync(timeOutInSeconds: Long, repeatDelayInSeconds: Long)
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ import timber.log.Timber
|
|||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* This no-op foreground service acts as a deterrent for the system
|
||||
* to avoid eagerly killing the app process.
|
||||
* This no-op foreground service acts as a deterrent to the system eagerly killing the app process.
|
||||
*
|
||||
* Keeping the app process alive avoids some OEMs ignoring scheduled WorkManager and AlarmManager tasks
|
||||
* when the app is not in the foreground.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue