unable to send Broadcast from activity to other: android
<p>i have problem with sending Broadcast receive from one activity to other ..its not working my code is below..pls refer to it ..</p>

<p>sending class is:</p>

<pre><code>    public class SendBroadcast extends Activity {
public static String BROADCAST_ACTION = "com.unitedcoders.android.broadcasttest.SHOWTOAST";

/** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    Button button1 = (Button) findViewById(R.id.button1);
    button1.setOnClickListener(new View.OnClickListener() {
    public void onClick(View view) {
        sendBroadcast();
        }

    });
}




  public void sendBroadcast(){

    Intent broadcast = new Intent();
    broadcast.setAction("com.unitedcoders.android.broadcasttest.SHOWTOAST");
    sendBroadcast(broadcast);
}
</code></pre>

<p>}</p>

<p>and reciving class is :</p>

<pre><code>  public class ToastDisplay extends Activity {

private BroadcastReceiver receiver = new BroadcastReceiver() {

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.i("asdasd","sdasdasd");
        // TODO Auto-generated method stub
        Toast.makeText(getApplicationContext(), "%%%%%%%%%%%%received", Toast.LENGTH_SHORT).show();

    }
};

@Override
protected void onResume() {
    IntentFilter filter = new IntentFilter();
    filter.addAction(SendBroadcast.BROADCAST_ACTION);
    registerReceiver(receiver, filter);

    super.onResume();
}

@Override
protected void onPause() {
    unregisterReceiver(receiver);
    super.onPause();
}
</code></pre>

<p>}</p>

<p>Manifest file is ::::</p>

<pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
 &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.unitedcoders.android.broadcasttest"
  android:versionCode="1"
  android:versionName="1.0"&gt;
 &lt;uses-sdk android:minSdkVersion="4" /&gt;

  &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
    &lt;activity android:name=".SendBroadcast"
              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;/activity&gt;
  &lt;activity android:name=".ToastDisplay"&gt;

    &lt;intent-filter&gt;
        &lt;action android:name="com.unitedcoders.android.broadcasttest.SHOWTOAST"&gt;  &lt;/action&gt;
    &lt;/intent-filter&gt;
  &lt;/activity&gt;

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