How to get data back from BroadcastReciever to Activity?
<p>I wrote sms application for which I wrote BroadcastReceiver.I want to get data from BroadcastReceiver into my activity ,so how do I get it.Please help me ,Please.</p>

<p>My Broadcast Reciever code is below:</p>

<pre><code>public class SmsReceiver extends BroadcastReceiver
{
    @Override
    public void onReceive(Context context, Intent intent) 
    {   
         //---get the SMS message passed in---
        Bundle bundle = intent.getExtras();        
        SmsMessage[] msgs = null;
        String str = "";            
        if (bundle != null)
        {
            //---retrieve the SMS message received---
            Object[] pdus = (Object[]) bundle.get("pdus");
            msgs = new SmsMessage[pdus.length];            
            for (int i=0; i&lt;msgs.length; i++){
                msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]);                
                str +=  msgs[i].getOriginatingAddress();                     

            }

            //---display the new SMS message---
            Toast.makeText(context, str, Toast.LENGTH_SHORT).show();
        }       
    }
}
</code></pre>

<p>I want to get back "str" value into another activity.</p>
