Hello
I have application, it use a usb accessory. One of my activity catch
USB_ACCESSORY_DETACHED and
USB_ACCESSORY_DETACHED events, its works fine.
here is my AndroidManifest.xml
---------
<activity
android:screenOrientation="portrait"
android:name=".WSInstallatorActivity"
android:exported="true"
>
<intent-filter>
<action
android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action
android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
<action
android:name="android.hardware.usb.action.USB_ACCESSORY_DETACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="@xml/accessory_filter" />
</activity>
---------
Nevertheless, i would like delegate this to my service or brodcast
receiver.
When i move intent-filter and meta-data to my broadcast receiver, i
not receive no more attach event. What is funny, i continue receive
detach event.
Its looks like USB_ACCESSORY_ATTACHED works only with activity,
despite "Broadcast Action" classification in documentation.
http://developer.android.com/reference/android/hardware/usb/UsbManager.html#ACTION_USB_ACCESSORY_ATTACHED
My conclusion is right? Maybe this is a bug ?
thanks in advance.
Sergey
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en