Simple Android Broadcast does not show toast
<p>I'm just trying to create a simple broadcast in Androids activity but its not working. </p>

<pre><code>/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    Intent i = new Intent("android.intent.action.UMS_CONNECTED"); 

    IntentFilter filter = new IntentFilter();
    filter.addAction("android.intent.action.UMS_CONNECTED");

    receiver = new BroadcastReceiver() {
      @Override
      public void onReceive(Context context, Intent intent) {
          Toast.makeText(getApplicationContext(), "connected", Toast.LENGTH_LONG).show();
      }
    };

    registerReceiver(receiver, filter);


        }
    }
</code></pre>

<p>The XML </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="usb.usbd"
      android:versionCode="1"
      android:versionName="1.0"&gt;
       &lt;uses-feature android:name="android.hardware.usb.host" /&gt;
    &lt;uses-sdk android:minSdkVersion="12" /&gt;    

    &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
        &lt;activity android:name=".UsbddActivity"
                  android:label="@string/app_name"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
             &lt;intent-filter&gt;
      &lt;action android:name="android.intent.action.UMS_CONNECTED" /&gt;
      &lt;action android:name="android.intent.action.UMS_DISCONNECTED" /&gt;
                        &lt;/intent-filter&gt;
        &lt;/activity&gt;

    &lt;/application&gt;
&lt;/manifest&gt;
</code></pre>

<p>The screen shows on my Xoom but the toast does not display. The Xoom is connected through the USB so it should display the toast/ </p>
