Broadcast will only work if your activity is in the foreground. If
your activity is not yet started, you can however start it with
specific data passed via bundle and in the onCreate() do specific
task.

If your activity is currently in the foreground, you need to listen to
broadcasts.

Thanks and Regards,
Kumar Bibek

On Jun 14, 6:17 am, Gabriel Simões <gsim...@gmail.com> wrote:
> Hello,
>
> I´ve been searching a way to implement an intent so when a user clicks
> on a notification, an specific method from an activity is executed (or
> an specific behavior happens).
> Right now I´m thinking about using broadcast but I don´t know if this
> is the best way to implement this functionality.
> How would you implement it?
>
> Thanks,
> Gabriel

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