[android-developers] Re: How trigger intent to execute a specific method from a specific activity
I am also looking for same solution.. Thank you for information. can you please share your working code .please thank you On Sunday, 20 June 2010 05:34:19 UTC+2, Gabriel Simões wrote: Thanks, Works as expected! On 16 jun, 05:31, a2ronus a...@theipcompany.nl wrote: 1. Register a BroadcastReceiver that listens for a specific Intent. 2. When the user clicks on the Notification, the PendingIntent will be launched. You can put extra's in this Intent. You can use the extra's to determine which method will be launched in the Service. Good luck, a2ronus On Jun 16, 1:12 am, Gabriel Simões gsim...@gmail.com wrote: any ideas on this one? tnx On 14 jun, 21:33, Gabriel Simões gsim...@gmail.com wrote: 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How trigger intent to execute a specific method from a specific activity
Thanks, Works as expected! On 16 jun, 05:31, a2ronus a...@theipcompany.nl wrote: 1. Register a BroadcastReceiver that listens for a specific Intent. 2. When the user clicks on the Notification, the PendingIntent will be launched. You can put extra's in this Intent. You can use the extra's to determine which method will be launched in the Service. Good luck, a2ronus On Jun 16, 1:12 am, Gabriel Simões gsim...@gmail.com wrote: any ideas on this one? tnx On 14 jun, 21:33, Gabriel Simões gsim...@gmail.com wrote: 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How trigger intent to execute a specific method from a specific activity
1. Register a BroadcastReceiver that listens for a specific Intent. 2. When the user clicks on the Notification, the PendingIntent will be launched. You can put extra's in this Intent. You can use the extra's to determine which method will be launched in the Service. Good luck, a2ronus On Jun 16, 1:12 am, Gabriel Simões gsim...@gmail.com wrote: any ideas on this one? tnx On 14 jun, 21:33, Gabriel Simões gsim...@gmail.com wrote: 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How trigger intent to execute a specific method from a specific activity
any ideas on this one? tnx On 14 jun, 21:33, Gabriel Simões gsim...@gmail.com wrote: 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How trigger intent to execute a specific method from a specific activity
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