HoangVuong
HoangVuong

Reputation: 1

How to use USB API with any USB device?

I've created an app that uses the USB API to open a new tab when the USB device is connected.

But now I want to improve it a bit. Before, when I use USB API I must define its vendorID and productID in the manifest. It means my app only use exactly one USB device.

Now I want any USB to interact with my app. Anybody can give me an idea to do it?

Upvotes: 0

Views: 271

Answers (1)

Xan
Xan

Reputation: 77482

I do believe it's impossible for security reasons. You can specify more than one PID/VID pair, but you cannot ask for arbitrary ones.

The stated reason for this is to prevent apps from fingerprinting hardware by enumerating all connected USB devices, which has a good chance to be a unique set.

Upvotes: 1

Related Questions