I added this is my manifest file -
I think you are mixing up two approaches to get phone state. If you use the intent-filter and broadcast receiver, then in the receiver no need to call the TelephonyManager's listen(). Just check the received intent like this :
public void onReceive(Context context, Intent intent) {
String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
String number = intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER);
if (TelephonyManager.EXTRA_STATE_RINGING.equals(state))
{
Log.d("MPR", "Its Ringing [" + number + "]");
}
if (TelephonyManager.EXTRA_STATE_IDLE.equals(state))
{
Log.d("MPR", "Its Idle");
}
if (TelephonyManager.EXTRA_STATE_OFFHOOK.equals(state))
{
Log.d("MPR", "Its OffHook");
}
}