On Mon, May 9, 2011 at 9:00 AM, Paula Gabriela <[email protected]> wrote:
> Hello everyone,
>
> I have a problem when I try to send a broadcast intent from App1 to App2 and
> set my component name using setComponent() method
>
> That is,
>
> In my APP2 I have
> String myAction = ..;
> IntentFilter filter = new IntentFilter();
> filter.addAction(myAction);
> this.registerReceiver(receiver, filter);
>
>
> //APP1
>
> String myAction = ..;
> Intent intent = new Intent(myAction);
> sendBroadcast(intent);
>
> it works, but if I use
>
> String myAction = ..;
> Intent intent = new Intent(myAction);
> intent.setComponent(new ComponentName(pkgApp2, clsApp2));
> sendBroadcast(intent);
>
> It doesn't works. So my question is: why?

Because there is no BroadcastReceiver with your designated package and class.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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