Share via


PrintService.ExtraPrintJobInfo Field

Definition

If you declared an optional activity with advanced print options via the android.R.attr#advancedPrintOptionsActivity advancedPrintOptionsActivity attribute, this extra is used to pass in the currently constructed PrintJobInfo to your activity allowing you to modify it.

[Android.Runtime.Register("EXTRA_PRINT_JOB_INFO")]
public const string ExtraPrintJobInfo;
[<Android.Runtime.Register("EXTRA_PRINT_JOB_INFO")>]
val mutable ExtraPrintJobInfo : string

Field Value

Attributes

Remarks

If you declared an optional activity with advanced print options via the android.R.attr#advancedPrintOptionsActivity advancedPrintOptionsActivity attribute, this extra is used to pass in the currently constructed PrintJobInfo to your activity allowing you to modify it. After you are done, you must return the modified PrintJobInfo via the same extra.

You cannot modify the passed in PrintJobInfo directly, rather you should build another one using the android.print.PrintJobInfo.Builder PrintJobInfo.Builder class. You can specify any standard properties and add advanced, printer specific, ones via android.print.PrintJobInfo.Builder#putAdvancedOption(String, String) PrintJobInfo.Builder.putAdvancedOption(String, String) and android.print.PrintJobInfo.Builder#putAdvancedOption(String, int) PrintJobInfo.Builder.putAdvancedOption(String, int). The advanced options are not interpreted by the system, they will not be visible to applications, and can only be accessed by your print service via PrintJob#getAdvancedStringOption(String) PrintJob.getAdvancedStringOption(String) and PrintJob#getAdvancedIntOption(String) PrintJob.getAdvancedIntOption(String).

If the advanced print options activity offers changes to the standard print options, you can get the current android.print.PrinterInfo PrinterInfo using the #EXTRA_PRINTER_INFO extra which will allow you to present the user with UI options supported by the current printer. For example, if the current printer does not support a given media size, you should not offer it in the advanced print options UI.

Java documentation for android.printservice.PrintService.EXTRA_PRINT_JOB_INFO.

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.

Applies to

See also