Android Forum » Android » Android Apps » Connect to USB accessory

Connect to USB accessory

Connect to USB accessory
created on Feb 11, 2013 8:48:48 PM
I have app working that automatically starts when evice is plugged in, but I need to have app already running and be able to detect and connect to USB device.

Looking through android developers USB accessory I understand that I need to setup Broadcast and requestPermission(). But I can not figure out if I need to still have following intent-filter in manifest?

<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER" />

<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />

</intent-filter>
Reply with quote Reply Link ±0     (0 votes)