Answer the question
In order to leave comments, you need to log in
Why doesn't ACTION_USB_DEVICE_ATTACHED work?
Greetings!
I'm trying to use usb host, I
learned how to work with already connected devices, now I want to catch the moment of connecting and disconnecting the device.
IntentFilter usbFilter = new IntentFilter();
usbFilter.addAction(ACTION_USB_PERMISSION);
usbFilter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);
usbFilter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED);
registerReceiver(USBReceiver, usbFilter);
<uses-feature android:name="android.hardware.usb.host"/>
there is. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question