How to create a incomming call broad receiver programatically <p>I have managed to put a broadcast receiver from the manifest file, it looks like this:</p> <pre><code> &lt;receiver android:name=".BReceivers.CallBReciever"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.PHONE_STATE" /&gt; &lt;/intent-filter&gt; &lt;/receiver&gt; </code></pre> <p>Now what i am trying to do is to take it out of the manifest and start it only when the user presses a certain button, which should look somethings like this:</p> <pre><code> Button start = (Button) findViewById(R.id.Button_Start); start.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { @Override public void onReceive(Context context, Intent arg1) { Log.d("aaa", "bbb"); switch (getResultCode()) { } } }, new IntentFilter(Intent.ACTION_CALL)); } } }); </code></pre> <p>But i don't get into the receiver, any idea why? what IntentFilter String param should i use?</p>