With introduction of new USB host and accessory modes, ums_connected
broadcasts do not work anymore. I tried using accessory mode. My app
runs in the background and it starts on bootup. I have a
broadcastreceiver that I need to be called when the tablet is
connected to a laptop. My AndroidManifest.xml file looks like -

<application android:icon="@drawable/icon" android:label="@string/
app_name" android:debuggable="true">
        <uses-feature android:name="android.hardware.usb.accessory" />
        <activity android:name=".SomeActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <receiver android:name=".BootupReceiver">
                <intent-filter>
                        <action 
android:name="android.intent.action.BOOT_COMPLETED" /
>
                        <category 
android:name="android.intent.category.DEFAULT" /
>
                </intent-filter>
        </receiver>
        <receiver android:name=".UsbEventReceiver">
                <intent-filter>
                    <action
android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
                    <action
android:name="android.hardware.usb.action.USB_ACCESSORY_DETACHED" /
>
                </intent-filter>
        </receiver>
    </application>



UsbEventReceiver is not called at all when I connect the tablet to my
laptop using USB.

-- 
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

Reply via email to