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 | |
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() |
Unit |
writeToParcel(parcel: Parcel, flags: Int) |
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: 4
STATE_CANCELED
static val STATE_CANCELED: Int
Print job state: The print job is canceled. This is a terminal state.
Next valid states: None
Value: 7
STATE_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: 5
STATE_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: 1
STATE_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: 6
STATE_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: 2
STATE_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: 3
Public methods
describeContents
fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
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.
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
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
parcel: Parcel,
flags: Int
): Unit
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 android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |