I want to access and launch broadcast receiver from an activity and do somthing
<p>I am trying to develop an android app, in which I want to sent a message from the phone while making call.</p>

<p>The destination number is taken from the application database.</p>

<p>I have completed till that part, but I cant access the broadcast receiver in my activity:</p>

<pre><code>public class PARENT_CALLActivity extends Activity 
{
/** Called when the activity is first created. */

String PARENT=null;
EditText edparent;
Button submit;
String parent_number;

public static final String BROADCAST = "sha.pcall.android.action.broadcast";



@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);


    edparent=(EditText)findViewById(R.id.editText1);
    submit=(Button)findViewById(R.id.btnsubmit);


    submit.setOnClickListener(new OnClickListener() 
    {

        @Override
        public void onClick(View v) 
        {
            // TODO Auto-generated method stub


            PARENT=edparent.getText().toString();   

            MyDabasehandler db=new MyDabasehandler(getApplicationContext());

            if(db.getContact().equals(null))
            {
                db.addContact(new Contacts(PARENT));

            }
            else
            {
                db.editContact();
            }

            Intent intent = new Intent(getApplicationContext(),LocationUpdateReceiver.class);
            sendBroadcast(intent);

             finish();
        }

    });       
}

public class LocationUpdateReceiver extends BroadcastReceiver 
{

    @Override
    public void onReceive(Context context, Intent intent)
    {

        String outgoing_number=intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);

        Toast.makeText(context, outgoing_number, Toast.LENGTH_LONG).show();
    }

    }

}
</code></pre>
