Search code examples
androidinteractiveandroid-c2dm

C2DM - onMessage, interactivity with results I get


I am successfully getting messages from C2DM service. Unfortunately I am not able to anyhow interact with them (set the string I get as a notification, or set it as a string in toast message,...). Is there any example how to do that?

SC:

    @Override
    protected void onMessage(Context context, Intent intent) {
    Log.e("C2DM", "Message: arived");
    Bundle extras = intent.getExtras();
    if (extras != null) {
        Log.d("DATA_ZE_SERVERU",extras.get("payload")+"");
        //how to interact with data?
    }

}

Thx

Nobody knows???


Solution

  • You can pass the string to a activity and let the activity show it. I did most of my c2dm like that.