How to create a Worker with parameters for in WorkManager for Android? : <p>Android architecture has a new components <a href="https://developer.android.com/topic/libraries/architecture/workmanager/" rel="noreferrer">WorkManager</a>.</p>

<p>From the <a href="https://developer.android.com/topic/libraries/architecture/workmanager/basics" rel="noreferrer">example</a>,</p>

<pre><code>class CompressWorker(context : Context, params : WorkerParameters)
    : Worker(context, params) {

    override fun doWork(): Result {

        // Do the work here--in this case, compress the stored images.
        // In this example no parameters are passed; the task is
        // assumed to be "compress the whole library."
        myCompress()

        // Indicate success or failure with your return value:
        return Result.SUCCESS

        // (Returning RETRY tells WorkManager to try this task again
        // later; FAILURE says not to try again.)

    }

}

val compressionWork = OneTimeWorkRequestBuilder&lt;CompressWorker&gt;().build()
</code></pre>

<p>How can I create a <code>Worker</code> that accept parameters in constructor or <code>doWork</code>?</p>
