# WorkerParametersExtensions

Added in 2.10.0

*** ** * ** ***


```
public final class WorkerParametersExtensions
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final boolean` | `https://developer.android.com/reference/androidx/work/WorkerParametersExtensions#(androidx.work.WorkerParameters).isRemoteWorkRequest()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/WorkerParameters receiver)` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/WorkerParameters` | `<T extends https://developer.android.com/reference/androidx/work/ListenableWorker> https://developer.android.com/reference/androidx/work/WorkerParametersExtensions#(androidx.work.WorkerParameters).usingRemoteService(android.content.ComponentName)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/WorkerParameters receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html componentName )` Returns a new instance of `https://developer.android.com/reference/androidx/work/WorkerParameters` representing a `https://developer.android.com/reference/androidx/work/WorkRequest` that can run in a process corresponding to the provided `https://developer.android.com/reference/android/content/ComponentName.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/WorkerParameters` | `https://developer.android.com/reference/androidx/work/WorkerParametersExtensions#(androidx.work.WorkerParameters).usingRemoteService(kotlin.String,android.content.ComponentName)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/WorkerParameters receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html workerClassName, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html componentName )` Returns a new instance of `https://developer.android.com/reference/androidx/work/WorkerParameters` representing a `https://developer.android.com/reference/androidx/work/WorkRequest` that can run in a process corresponding to the provided `https://developer.android.com/reference/android/content/ComponentName.html`. |

## Public methods

### isRemoteWorkRequest

Artifact: [androidx.work:work-runtime](https://developer.android.com/jetpack/androidx/releases/work) [View Source](https://cs.android.com/search?q=file:androidx/work/WorkerParameters.kt+function:isRemoteWorkRequest) Added in [2.10.0](https://developer.android.com/jetpack/androidx/releases/work#2.10.0)

```
public static final boolean isRemoteWorkRequest(@NonNull WorkerParameters receiver)
```

| Returns |
|---|---|
| `boolean` | `true` if and only if the instance of `https://developer.android.com/reference/androidx/work/WorkerParameters` corresponds to a `https://developer.android.com/reference/androidx/work/WorkRequest` that runs in a remote process. |

### usingRemoteService

Artifact: [androidx.work:work-runtime](https://developer.android.com/jetpack/androidx/releases/work) [View Source](https://cs.android.com/search?q=file:androidx/work/WorkerParameters.kt+function:usingRemoteService)

```
public static final @NonNull WorkerParameters <T extends ListenableWorker> usingRemoteService(
    @NonNull WorkerParameters receiver,
    @NonNull ComponentName componentName
)
```

Returns a new instance of `https://developer.android.com/reference/androidx/work/WorkerParameters` representing a `https://developer.android.com/reference/androidx/work/WorkRequest` that can run in a process corresponding to the provided `https://developer.android.com/reference/android/content/ComponentName.html`.

| Parameters |
|---|---|
| `<T extends https://developer.android.com/reference/androidx/work/ListenableWorker>` | The `https://developer.android.com/reference/androidx/work/ListenableWorker` to delegate to. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html componentName` | The `https://developer.android.com/reference/android/content/ComponentName.html` that identifies the `RemoteService` that hosts the `https://developer.android.com/reference/androidx/work/WorkRequest`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/WorkerParameters` | A new instance of `https://developer.android.com/reference/androidx/work/WorkerParameters` |

### usingRemoteService

Artifact: [androidx.work:work-runtime](https://developer.android.com/jetpack/androidx/releases/work) [View Source](https://cs.android.com/search?q=file:androidx/work/WorkerParameters.kt+function:usingRemoteService) Added in [2.10.0](https://developer.android.com/jetpack/androidx/releases/work#2.10.0)

```
public static final @NonNull WorkerParameters usingRemoteService(
    @NonNull WorkerParameters receiver,
    @NonNull String workerClassName,
    @NonNull ComponentName componentName
)
```

Returns a new instance of `https://developer.android.com/reference/androidx/work/WorkerParameters` representing a `https://developer.android.com/reference/androidx/work/WorkRequest` that can run in a process corresponding to the provided `https://developer.android.com/reference/android/content/ComponentName.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html workerClassName` | The fully qualified class name of the `https://developer.android.com/reference/androidx/work/ListenableWorker` to delegate to |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html componentName` | The `https://developer.android.com/reference/android/content/ComponentName.html` that identifies the `RemoteService` that hosts the `https://developer.android.com/reference/androidx/work/WorkRequest`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/WorkerParameters` | A new instance of `https://developer.android.com/reference/androidx/work/WorkerParameters` |