usbPrinters
清单属性使用 printerProvider API 声明应用支持哪些 USB 打印机。
manifest.json 示例
{
"name": "My printer app",
"usb_printers": {
"filters": [
// This app can print to the Nexus One and any printer made by Google.
{ "vendorId": 6353, "productId": 19985 },
{ "vendorId": 6353, "interfaceClass": 7 }
]
},
...
}
参考
filters
(对象数组)- 必需与受支持设备匹配的 USB 设备过滤条件列表。设备只需匹配所提供的其中一个过滤条件即可。
vendorId
是必需的,并且只能提供productId
或interfaceClass
中的一个。