I have Android service application with USB host connection to CDC device.
How can I set permament USB permission without auto start Activity?
I found lot of examples with intent-filter android.hardware.usb.action.USB_DEVICE_ATTACHED, meta-data.
When I used it, it works. But everytime I reconnect USB device, application is restarted.
I tried to create “startup” activity for service, with android:launchMode=”singleInstance”, it works fine. But I don’t want any activity.
So it is possible “permanent USB permission” without use of activity?
Or second question? Is it possible suspend USB device from application?