public class PrintJobsContract extends Object
PrintJobsConnector.print(Printer, PrintJob)
and
get the state of a print job (PrintJobsConnector.getState(String)
.
It is highly recommended to use PrintJobsConnector
to interface with the print job queue, but you can
also use ContentProvider.call(String, String, Bundle)
directly applying the contract
documented by this class.Modifier and Type | Field and Description |
---|---|
static Uri |
AUTHORITY_URI
A content:// style uri to the authority for the print job provider.
|
static String |
EXTRA_PRINTER
Extra required for call method
METHOD_PRINT , a Printer where the print job shall be printed. |
static String |
EXTRA_PRINTJOB
Extra required for call method
METHOD_PRINT , a PrintJob , the print job to print. |
static String |
EXTRA_PRINTJOB_ID
Extra required for call method
METHOD_GET_STATE , a String , the print job ID to for which to
obtain status. |
static String |
EXTRA_PRINTJOB_STATE
Extra required for call method
METHOD_GET_PRINTJOB_IDS , an int , the state of the to be returned
print jobs. |
static String |
METHOD_GET_PRINTJOB_IDS
Call method name to invoke "get print jobs".
|
static String |
METHOD_GET_STATE
Call method name to invoke "get state".
|
static String |
METHOD_PRINT
Call method name to invoke "print".
|
static String |
RESULT_GET_PRINTJOB_IDS
Result returned from from call method
METHOD_GET_PRINTJOB_IDS , an ArrayList<String> ,
the print job IDs with the given state. |
static String |
RESULT_GET_STATE
Result returned from from call method
METHOD_GET_STATE , an int , the print job state. |
static String |
RESULT_PRINT
Result returned from from call method
METHOD_PRINT , a String , the print job ID. |
static int |
STATE_DONE
Print job status: done.
|
static int |
STATE_ERROR
Print job status: error.
|
static int |
STATE_IN_QUEUE
Print job status: in queue.
|
static int |
STATE_PRINTING
Print job status: printing.
|
Constructor and Description |
---|
PrintJobsContract() |
public static final Uri AUTHORITY_URI
public static final int STATE_IN_QUEUE
public static final int STATE_PRINTING
public static final int STATE_DONE
public static final int STATE_ERROR
public static final String METHOD_PRINT
EXTRA_PRINTER
) and the print job (EXTRA_PRINTJOB
).
The result bundle will contain a String
that is the print job ID at the key
RESULT_PRINT
.public static final String METHOD_GET_STATE
EXTRA_PRINTJOB_ID
).
The result bundle will contain an int
that is the print job state at the key
RESULT_GET_STATE
.public static final String METHOD_GET_PRINTJOB_IDS
EXTRA_PRINTJOB_STATE
). Only print jobs that have the given state are returned.
The result bundle will contain an ArrayList<String>
that is the matching print job IDs
at the key RESULT_GET_PRINTJOB_IDS
.public static final String EXTRA_PRINTER
METHOD_PRINT
, a Printer
where the print job shall be printed.METHOD_PRINT
,
Constant Field Valuespublic static final String EXTRA_PRINTJOB
METHOD_PRINT
, a PrintJob
, the print job to print.METHOD_PRINT
,
Constant Field Valuespublic static final String EXTRA_PRINTJOB_ID
METHOD_GET_STATE
, a String
, the print job ID to for which to
obtain status.METHOD_GET_STATE
,
Constant Field Valuespublic static final String EXTRA_PRINTJOB_STATE
METHOD_GET_PRINTJOB_IDS
, an int
, the state of the to be returned
print jobs.METHOD_GET_PRINTJOB_IDS
,
Constant Field Valuespublic static final String RESULT_PRINT
METHOD_PRINT
, a String
, the print job ID.METHOD_PRINT
,
Constant Field Valuespublic static final String RESULT_GET_STATE
METHOD_GET_STATE
, an int
, the print job state.public static final String RESULT_GET_PRINTJOB_IDS
METHOD_GET_PRINTJOB_IDS
, an ArrayList<String>
,
the print job IDs with the given state.