WorkerParameters
class WorkerParameters
kotlin.Any | |
↳ | androidx.work.WorkerParameters |
Setup parameters for a ListenableWorker
.
Summary
Public methods | |
---|---|
UUID |
getId() Gets the ID of the |
Data |
Gets the input data. |
Network? |
Gets the |
Int |
Gets the current run attempt count for this work. |
MutableSet<String!> |
getTags() Gets a |
MutableList<String!> |
Gets the list of content authorities that caused this Worker to execute. |
MutableList<Uri!> |
Gets the list of content |
Public methods
getId
@NonNull fun getId(): UUID
Gets the ID of the WorkRequest
that created this ListenableWorker
.
Return | |
---|---|
UUID |
The ID of the creating WorkRequest |
getInputData
@NonNull fun getInputData(): Data
Gets the input data. Note that in the case that there are multiple prerequisites for this ListenableWorker
, the input data has been run through an InputMerger
.
Return | |
---|---|
Data |
The input data for this work |
getNetwork
@RequiresApi(28) @Nullable fun getNetwork(): Network?
Gets the android.net.Network
to use for this Worker. This method returns null
if there is no network needed for this work request.
Return | |
---|---|
Network? |
The android.net.Network specified by the OS to be used with this Worker |
getRunAttemptCount
@IntRange(0) fun getRunAttemptCount(): Int
Gets the current run attempt count for this work. Note that for periodic work, this value gets reset between periods.
Return | |
---|---|
Int |
The current run attempt count for this work. |
getTags
@NonNull fun getTags(): MutableSet<String!>
Gets a java.util.Set
of tags associated with this Worker's WorkRequest
.
Return | |
---|---|
MutableSet<String!> |
The java.util.Set of tags associated with this Worker's WorkRequest |
See Also
getTriggeredContentAuthorities
@RequiresApi(24) @NonNull fun getTriggeredContentAuthorities(): MutableList<String!>
Gets the list of content authorities that caused this Worker to execute. See JobParameters#getTriggeredContentAuthorities()
for relevant JobScheduler
code.
Return | |
---|---|
MutableList<String!> |
The list of content authorities that caused this Worker to execute |
getTriggeredContentUris
@RequiresApi(24) @NonNull fun getTriggeredContentUris(): MutableList<Uri!>
Gets the list of content android.net.Uri
s that caused this Worker to execute. See
Return | |
---|---|
MutableList<Uri!> |
The list of content android.net.Uri s that caused this Worker to execute |