Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!

androidx.work.ktx

Top-level functions summary

OneTimeWorkRequest.Builder

PeriodicWorkRequest.Builder
PeriodicWorkRequestBuilder(repeatInterval: Long, repeatIntervalTimeUnit: TimeUnit)

PeriodicWorkRequest.Builder
PeriodicWorkRequestBuilder(repeatInterval: Long, repeatIntervalTimeUnit: TimeUnit, flexTimeInterval: Long, flexTimeIntervalUnit: TimeUnit)

Extension functions summary

Top-level functions

OneTimeWorkRequestBuilder

inline fun <reified W : Worker> 
        OneTimeWorkRequestBuilder
(): OneTimeWorkRequest.Builder

Deprecated:

Creates a OneTimeWorkRequest with the given Worker.

PeriodicWorkRequestBuilder

inline fun <reified W : Worker> 
        PeriodicWorkRequestBuilder
(repeatInterval: Long, repeatIntervalTimeUnit: TimeUnit): PeriodicWorkRequest.Builder

Deprecated:

Creates a PeriodicWorkRequest.Builder with a given Worker.

Parameters
repeatInterval @see androidx.work.PeriodicWorkRequest.Builder
repeatIntervalTimeUnit @see androidx.work.PeriodicWorkRequest.Builder

PeriodicWorkRequestBuilder

inline fun <reified W : Worker> 
        PeriodicWorkRequestBuilder
(repeatInterval: Long, repeatIntervalTimeUnit: TimeUnit, flexTimeInterval: Long, flexTimeIntervalUnit: TimeUnit): PeriodicWorkRequest.Builder

Deprecated:

Creates a PeriodicWorkRequest.Builder with a given Worker.

Parameters
repeatInterval @see androidx.work.PeriodicWorkRequest.Builder
repeatIntervalTimeUnit @see androidx.work.PeriodicWorkRequest.Builder
flexInterval @see androidx.work.PeriodicWorkRequest.Builder
flexIntervalTimeUnit @see androidx.work.PeriodicWorkRequest.Builder

Extension functions

setInputMerger

inline fun OneTimeWorkRequest.Builder.
        setInputMerger
(inputMerger: KClass<out InputMerger>): OneTimeWorkRequest.Builder!

Deprecated:

Sets an InputMerger on the OneTimeWorkRequest.Builder.

toWorkData

inline fun <V> Map<String, V>.
        toWorkData
(): Data

Deprecated:

Converts a Map to a Data object.