Hi all!

 I had read in a lot of forum it is a problem to developers to write a
program witch can detect the connected / disconnected USB event. Here is my
solution:

Manifest.xml :

        <receiver android:name=".MyReceiver">
            <intent-filter>
                <action android:name="android.intent.action.ums_connected"
/>
            </intent-filter>
        </receiver>

Myreceiver:

public class MyReceiver extends BroadcastReceiver{
if (intent.getAction().equalsIgnoreCase(
        "android.intent.action.UMS_CONNECTED")) {...}
}


bye:Károly Holczhauser from Hungary

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to