receiving cd2m in background

Hi all,

I need to receive c2dm when app is not running. (background)
The class com.backendless.push.BackendlessBroadcastReceiver handles c2dm.intent.RECEIVE.

Should I create another broadcast receiver?
Should I create a class, Inheriting from BackendlessBroadcastReceiver?

Any suggestions?

Thanks.
Scott

No, you do not need to create another receiver. You can use BackendlessBroadcastReceiver as it is described here: http://backendless.com/documentation/messaging/android/messaging_push_notification_setup_androi.htm

Regards,
Mark

Hi Mark,

I already did that.
I need to start a activity when message is received (when app is not running).

Yes, in this case you should create a subclass of BackendlessBroadcastReceiver. To see a working example of that approach you can do the following:

    Login to Backendless Console and select your app Click Code Generation Select Android Select between Eclipse and IntelliJ IDEA Click "Sample chat" in the Messaging box Download project.
In the downloaded project source code you will find the PushReceiver class. It is a custom broadcast receiver which inherits from BackendlessBroadcastReceiver.

Regards,
Mark

Thanks Mark.