PrintJobInfo
class PrintJobInfo : Parcelable
| kotlin.Any | |
| ↳ | android.print.PrintJobInfo |
This class represents the description of a print job. The print job state includes properties such as its id, print attributes used for generating the content, and so on. Note that the print jobs state may change over time and this class represents a snapshot of this state.
Summary
| Nested classes | |
|---|---|
|
Builder for creating a |
|
| Constants | |
|---|---|
| static Int |
Print job state: The print job is blocked. |
| static Int |
Print job state: The print job is canceled. |
| static Int |
Print job state: The print job is successfully printed. |
| static Int |
Print job state: The print job is being created but not yet ready to be printed. |
| static Int |
Print job state: The print job was printing but printing failed. |
| static Int |
Print job state: The print jobs is created, it is ready to be printed and should be processed. |
| static Int |
Print job state: The print job is being printed. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| Int |
getAdvancedIntOption(key: String!)Gets the value of an advanced (printer specific) print option. |
| String! |
getAdvancedStringOption(key: String!)Gets the value of an advanced (printer specific) print option. |
| PrintAttributes |
Gets the print job attributes. |
| Int |
Gets the number of copies. |
| Long |
Gets the wall time in millisecond when this print job was created. |
| PrintJobId? |
getId()Gets the unique print job id. |
| String |
getLabel()Gets the human readable job label. |
| Array<PageRange!>? |
getPages()Gets the included pages. |
| PrinterId? |
Gets the unique target printer id. |
| Int |
getState()Gets the current job state. |
| Boolean |
hasAdvancedOption(key: String!)Gets whether this job has a given advanced (printer specific) print option. |
| String |
toString()Returns a string representation of the object. |
| Unit |
writeToParcel(parcel: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<PrintJobInfo!> | |
Constants
STATE_BLOCKED
static val STATE_BLOCKED: Int
Print job state: The print job is blocked.
Next valid states: STATE_FAILED, STATE_CANCELED, STATE_STARTED
Value: 4STATE_CANCELED
static val STATE_CANCELED: Int
Print job state: The print job is canceled. This is a terminal state.
Next valid states: None
Value: 7STATE_COMPLETED
static val STATE_COMPLETED: Int
Print job state: The print job is successfully printed. This is a terminal state.
Next valid states: None
Value: 5STATE_CREATED
static val STATE_CREATED: Int
Print job state: The print job is being created but not yet ready to be printed.
Next valid states: STATE_QUEUED
Value: 1STATE_FAILED
static val STATE_FAILED: Int
Print job state: The print job was printing but printing failed.
Next valid states: STATE_CANCELED, STATE_STARTED
Value: 6STATE_QUEUED
static val STATE_QUEUED: Int
Print job state: The print jobs is created, it is ready to be printed and should be processed.
Next valid states: STATE_STARTED, STATE_FAILED, STATE_CANCELED
Value: 2STATE_STARTED
static val STATE_STARTED: Int
Print job state: The print job is being printed.
Next valid states: STATE_COMPLETED, STATE_FAILED, STATE_CANCELED, STATE_BLOCKED
Value: 3Public methods
describeContents
fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getAdvancedIntOption
fun getAdvancedIntOption(key: String!): Int
Gets the value of an advanced (printer specific) print option.
| Parameters | |
|---|---|
key |
String!: The option key. |
| Return | |
|---|---|
Int |
The option value. |
getAdvancedStringOption
fun getAdvancedStringOption(key: String!): String!
Gets the value of an advanced (printer specific) print option.
| Parameters | |
|---|---|
key |
String!: The option key. |
| Return | |
|---|---|
String! |
The option value. |
getAttributes
fun getAttributes(): PrintAttributes
Gets the print job attributes.
| Return | |
|---|---|
PrintAttributes |
The attributes. This value cannot be null. |
getCopies
fun getCopies(): Int
Gets the number of copies.
| Return | |
|---|---|
Int |
The number of copies or zero if not set. Value is 0 or greater |
getCreationTime
fun getCreationTime(): Long
Gets the wall time in millisecond when this print job was created.
| Return | |
|---|---|
Long |
The creation time in milliseconds. |
getId
fun getId(): PrintJobId?
Gets the unique print job id.
| Return | |
|---|---|
PrintJobId? |
The id. This value may be null. |
getLabel
fun getLabel(): String
Gets the human readable job label.
| Return | |
|---|---|
String |
The label. This value cannot be null. |
getPages
fun getPages(): Array<PageRange!>?
Gets the included pages.
| Return | |
|---|---|
Array<PageRange!>? |
The included pages or null if not set. |
getPrinterId
fun getPrinterId(): PrinterId?
Gets the unique target printer id.
| Return | |
|---|---|
PrinterId? |
The target printer id. This value may be null. |
getState
fun getState(): Int
Gets the current job state.
| Return | |
|---|---|
Int |
The job state. Value is one of the following: |
hasAdvancedOption
fun hasAdvancedOption(key: String!): Boolean
Gets whether this job has a given advanced (printer specific) print option.
| Parameters | |
|---|---|
key |
String!: The option key. |
| Return | |
|---|---|
Boolean |
Whether the option is present. |
toString
fun toString(): String
Returns a string representation of the object.
| Return | |
|---|---|
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
parcel: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
The Parcel in which the object should be written. This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|