JobPriority Enum
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.
public enum JobPriority
type JobPriority =
- Inheritance
-
JobPriority
Fields
| Name | Value | Description |
|---|---|---|
| Min | 100 | Job has minimal value to the user. The user has absolutely no expectation or knowledge of this task and it has no bearing on the user's perception of the app whatsoever. JobScheduler may decide to defer these tasks while there are higher priority tasks in order to ensure there is sufficient quota available for the higher priority tasks. A sample task of min priority: uploading analytics Android reference for 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. |
| Low | 200 | Low priority. The task provides some benefit to users, but is not critical and is more of a nice-to-have. This is more important than minimum priority jobs and will be prioritized ahead of them, but may still be deferred in lieu of higher priority jobs. JobScheduler may decide to defer these tasks while there are higher priority tasks in order to ensure there is sufficient quota available for the higher priority tasks. A sample task of low priority: prefetching data the user hasn't requested Android reference for 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. |
| Default | 300 | Default value for all regular jobs. As noted in JobScheduler, these jobs have a general execution time of 10 minutes. Receives the standard job management policy. Android reference for 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. |
| High | 400 | This task should be ordered ahead of most other tasks. It may be deferred a little, but if it doesn't run at some point, the user may think something is wrong. Assuming all constraints remain satisfied (including ideal system load conditions), these jobs can have an execution time of at least 4 minutes. Setting all of your jobs to high priority will not be beneficial to your app and in fact may hurt its performance in the long run. Android reference for 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. |
| Max | 500 | This task is critical to user experience or functionality and should be run ahead of all other tasks. Only expedited jobs and user-initiated jobs can have this priority. Example tasks of max priority: Receiving a text message and processing it to show a notification; Downloading or uploading some content the user requested to transfer immediately Android reference for 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. |