I have added an action to the intent filter in packages/apps/Phone/src/
com/android/phone/PhoneApp.java

intentFilter.addAction(MY_CUSTOM_ACTION);
registerReceiver(mReceiver, intentFilter);

Now I try to send a broadcast from my application:

                Intent i = new Intent();
                i.setAction(MY_CUSTOM_ACTION);
                sendBroadcast(i);

However the public void onReceive(Context context, Intent intent)
function in the mReceiver within the PhoneApp.java
doesn't seem to receive the intent. Because I have put in code that
should show up following toast if control reached inside the onReceive

NotificationMgr.getDefault().postTransientNotification(4, "Reached
here!!!!");

Is there any mechanism in place that prevents custom apps from sending
intents to the PhoneApp?

I am trying to run this on an emulator. I build the android source
myself and my emulator points to userdata.img.

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

Reply via email to