Broadcast Receiver doesn't work
<p>Main Activity Code. BroadcastExample.java</p>

<pre><code>package com.example.broadcast;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class BroadcastExaple extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d("PHONE", "Main Activity...Called");
        setContentView(R.layout.main);
        Log.d("PHONE", "After Mainf Activity...");
    }
}
</code></pre>

<p>MyBroadCastReceiver.java</p>

<pre><code>package com.example.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.Log;


public class MyBroadcastReceiver extends BroadcastReceiver {
 @Override
 /*public void onReceive(Context context, Intent intent) {
  try{
  Log.d("Call BroadCAST","Calling Broad CAST");
  MyPhoneStateListener phoneListener = new MyPhoneStateListener();
  TelephonyManager telephony = (TelephonyManager) context
    .getSystemService(Context.TELEPHONY_SERVICE);
  telephony.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE);
  }
  catch(Exception e)
  {

  }

 }*/
  public void onReceive(Context context, Intent intent) {

       Log.d("Message", "Message Received");
    }


}
</code></pre>

<p>AndroidManifest.xml</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.example.broadcast" android:versionCode="1"
 android:versionName="1.0"&gt;
 &lt;uses-prmission android:name="android.permission.READ_PHONE_STATE" /&gt;
 &lt;uses-permission android:name="android.permission.CALL_PHONE"/&gt;
 &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
  &lt;activity android:name=".BroadcastExaple" 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;receiver android:name=".MyBroadcastReceiver"&gt;
   &lt;intent-filter&gt;
    &lt;action android:name="android.intent.action.PHONE_STATE" /&gt;
   &lt;/intent-filter&gt;
   &lt;/receiver&gt;

 &lt;/application&gt;


 &lt;uses-sdk android:minSdkVersion="7" /&gt;

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

<p>Program doesn't enter into the onReceive Mathod of MyBroadCastReceiver class.</p>
