Monday, June 14, 2010

[android-developers] Re: How trigger intent to execute a specific method from a specific activity

I need to send it to a service.

How can a notification message start an specific action (method) on a
service? is that possible (for example ... a service downloading a
file would stop the download as the user clicks on the
notification....)?

tnx

On 14 jun, 00:21, Kumar Bibek <coomar....@gmail.com> wrote:
> 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate