Can't receive broadcast Intent of UsbManager.ACTION_USB_DEVICE_ATTACHED/UsbManager.ACTION_USB_DEVICE_DETACHED
I am coding an USB host App recently, but it's stucked because I can't detect the device attached/detached event, I followed the coding note of http://developer.android.com/guide/topics/connectivity/usb/host.html and refer to other's coding in the network, After checking several times, I still can't find the problem. After my debugging, it seems that the UsbManager.ACTION_USB_DEVICE_ATTACHED/UsbManager.ACTION_USB_DEVICE_DETACHED intent is not happened, Because I try to use Context.sendBroadcast() to send a customized Intent, and my BroadcastReceiver can receive the intent. But when I attach