send broadcast from Service to Activity?
<p>I'm having a problem with sending a broadcast from a Service to an activity.</p>

<p>This is what I have in my Service class:</p>

<pre><code>Intent intent = new Intent();
intent.setAction(BROADCAST_ACTION);
sendBroadcast(intent);
</code></pre>

<p>I have many Activities and in one of my activities I have this:</p>

<pre><code>   class MyBroadcast extends BroadcastReceiver {
            @Override
            public void onReceive(Context ctxt, Intent i) {


                System.out.println("received");

            }
        };
</code></pre>

<p>The problem I have is that my broadcast receiver doesn't receive anything!!</p>

<p>Help!</p>

<p>EDIT: </p>

<p>If I have many activities how can send a broadcast message to all of them. In other words can I apply the same broadcast receiver to all the activities !?</p>
