Fred B
- Forum posts: 1
Feb 11, 2013, 8:48:48 PM via Website
Feb 11, 2013 8:48:48 PM via Website
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>
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>
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.