17 messages in com.googlegroups.android-developersRe: Intent receiver example| From | Sent On | Attachments |
|---|---|---|
| eric m | 25 Feb 2008 19:14 | |
| eric m | 26 Feb 2008 18:12 | |
| eric m | 26 Feb 2008 18:37 | |
| Dexter's Brain | 26 Feb 2008 19:01 | |
| eric m | 26 Feb 2008 19:20 | |
| eric m | 26 Feb 2008 20:21 | |
| hackbod | 26 Feb 2008 20:31 | |
| eric m | 26 Feb 2008 21:00 | |
| Diego Torres Milano | 27 Feb 2008 02:12 | |
| eric m | 27 Feb 2008 19:34 | |
| hackbod | 28 Feb 2008 00:54 | |
| Dexter's Brain | 28 Feb 2008 01:16 | |
| Diego Torres Milano | 28 Feb 2008 01:44 | |
| Dexter's Brain | 28 Feb 2008 19:52 | |
| eric m | 28 Feb 2008 20:05 | |
| hackbod | 28 Feb 2008 23:33 | |
| Diego Torres Milano | 29 Feb 2008 03:07 |
| Subject: | Re: Intent receiver example![]() |
|---|---|
| From: | Dexter's Brain (coom...@gmail.com) |
| Date: | 02/26/2008 07:01:20 PM |
| List: | com.googlegroups.android-developers |
Hey Eric,
You dont have to write anything in you activity. Create a separate class for the Intent Receiver, dont code anything in the Activity class. Now push your apk into the device. Even if your application is not running, if that Intent is trigerred, your receiver will be called. And of course, if your application is running also, the same thing happens.
In your new class, just extend from the IntentReciever.
You can use Context object of the application to access variables of your main class.... I haven't done this, but i have read it somewhere,,,
Dexter
On Feb 27, 7:37 am, eric m <EMUL...@gmail.com> wrote:
Maybe a more specific question then. Can I implement a onReceiveIntent() method if my class extends activity? Or does it have to extend IntentReceiver?
If it is the latter, how do I access information (variables) in my main class if I have to spawn a new class to receive the intent?
::confused::
On Feb 26, 9:12 pm, eric m <EMUL...@gmail.com> wrote:
I hate to bump my own thread but I'm still searching for an example of this. I have code that appears to work, except the onReceiveIntent() function in my main class never executes in reply to the NotificationManager's intent.
How do I properly respond to the notification manager?
On Feb 25, 10:14 pm, eric m <EMUL...@gmail.com> wrote:
I am looking for a working example of how to use an intent receiver.
I have an activity that launches a service. The service eventually displays a notification to the user using notification manager. I want the original activity - with the same state, variables, etc - to be called if the user selects the notification.
The original activity works (except the intent receiver), the notification works, but I am not sure how to respond to the user selecting the notification.
I really need an example and can't seem to find a suitable one in ApiDemos.




