マニフェスト - USB プリンタ

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 のいずれか 1 つのみを指定できます。