Compartilhar via


PrintService.ServiceMetaData Field

Definition

Name under which a PrintService component publishes additional information about itself.

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

Field Value

Attributes

Remarks

Name under which a PrintService component publishes additional information about itself. This meta-data must reference a XML resource containing a &lt;{@link android.R.styleable#PrintService print-service}&gt; tag. This is a sample XML file configuring a print service:

&lt;print-service
                android:vendor="SomeVendor"
                android:settingsActivity="foo.bar.MySettingsActivity"
                andorid:addPrintersActivity="foo.bar.MyAddPrintersActivity."
                . . .
            /&gt;

For detailed configuration options that can be specified via the meta-data refer to android.R.styleable#PrintService android.R.styleable.PrintService.

If you declare a settings or add a printers activity, they have to be exported, by setting the android.R.attr#exported activity attribute to true . Also in case you want only the system to be able to start any of these activities you can specify that they request the android.permission .START_PRINT_SERVICE_CONFIG_ACTIVITY permission by setting the android.R.attr#permission activity attribute.

Java documentation for android.printservice.PrintService.SERVICE_META_DATA.

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