I can't get my BroadcastReceiver to work.  I'm not getting any errors
so I'm not sure what the issue is.

My class looks like this:

public class CallReceiver extends BroadcastReceiver
{
  @Override
  public void onReceive( final Context context, final Intent intent )
  {
    Log.i( "l", "onReceive()" );
    Log.i( "l", "context: " + context );
    Log.i( "l", "intent: " + intent );

    if( intent.getAction().equals( Intent.ACTION_NEW_OUTGOING_CALL ) )
    {
      String number = intent.getExtras().getString( Intent.EXTRA_PHONE_NUMBER );
      Log.i( "l", "number: " + number );
    }
  }
}

I am using the "statically publish" method.  I have an entry like this
between my <application> tags in my manifest:

<receiver android:enabled="true"
android:name="com.example.shared.CallReceiver"></receiver>

I have the READ_PHONE_STATE permission in my manifest:

<uses-permission
android:name="android.permission.READ_PHONE_STATE"></uses-permission>

To test it I am simply placing an out going call.  The problem is I
never see any of the log messages I am expecting to see.  What am I
missing or doing wrong?


Thanks.


-- 
Greg Donald
destiney.com | gregdonald.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to