0

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?

Brian D
  • 9,863
  • 18
  • 61
  • 96

1 Answers1

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