I've got two classes, Main and C2DMReceiver -- I want the receiver to obviously receive push notifications from C2DM, but I need context in order to push task bar notifications to the UI -- context which is only found in classes extending Activity. Since the notifications are invoking the C2DM receiver class, I can't just instantiate it and pass it context -- how can I notify the user upon the receipt of a C2DM message?
Asked
Active
Viewed 74 times
1 Answers
1
Your C2DMReceiver should extend BroadcastReceiver, which will receive a Context through onReceive.
Have a look at this tutorial

Will Kru
- 5,164
- 3
- 28
- 41