JobInfo.Builder.SetMinimumNetworkChunkBytes(Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set the minimum size of non-resumable network traffic this job requires, in bytes.
[Android.Runtime.Register("setMinimumNetworkChunkBytes", "(J)Landroid/app/job/JobInfo$Builder;", "", ApiSince=33)]
public Android.App.Job.JobInfo.Builder SetMinimumNetworkChunkBytes(long chunkSizeBytes);
[<Android.Runtime.Register("setMinimumNetworkChunkBytes", "(J)Landroid/app/job/JobInfo$Builder;", "", ApiSince=33)>]
member this.SetMinimumNetworkChunkBytes : int64 -> Android.App.Job.JobInfo.Builder
Parameters
- chunkSizeBytes
- Int64
The smallest piece of data that cannot be easily paused and resumed, in bytes. Use a positive value, or NetworkBytesUnknown if unknown.
Returns
This builder instance.
- Attributes
Remarks
Set the minimum size of non-resumable network traffic this job requires, in bytes. When the upload or download can be easily paused and resumed, use this to set the smallest size that must be transmitted between start and stop events to be considered successful. If the transfer cannot be paused and resumed, then this should be the sum of the values provided to JobInfo.Builder.setEstimatedNetworkBytes(long,long).
Apps are encouraged to provide values that are as accurate as possible since JobScheduler will try to run the job at a time when at least the minimum chunk can be transmitted to reduce the amount of repetitive data that's transferred. Jobs that cannot provide reasonable estimates should use the sentinel value JobInfo.NETWORK_BYTES_UNKNOWN.
The values provided here only reflect the minimum non-resumable traffic that will be performed by the base job; if you're using JobWorkItem then you also need to define the network traffic used by each work item when constructing them.
Android reference for android.app.job.JobInfo.Builder.setMinimumNetworkChunkBytes.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.