PrintService.ServiceMetaData Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 <{@link android.R.styleable#PrintService print-service}>
tag. This is a sample XML file configuring a print service:
<print-service
android:vendor="SomeVendor"
android:settingsActivity="foo.bar.MySettingsActivity"
andorid:addPrintersActivity="foo.bar.MyAddPrintersActivity."
. . .
/>
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.