My device uses a Qualcomm chip, Android 7 (SDK 25). I am coding an app that uses a USB camera (webcam) to record and capture. To hold permanent permission for my app. My problem is, the first time plugging the USB cam into my device, a dialog appears and I have to tick "Use by default for this USB device".
My device has no screen, to do that I need to use ADB debug, connect WiFi, and use Vysor to access the device.
I tried setting my app as a system app but it did not solve my problem.
I wonder how to make my app auto-accepts the dialog.