@Override
	protected void onMessage(Context context, Intent intent) {
		Log.i(TAG, "Received message");
		Set<String> extras = intent.getExtras().keySet();
		int size = 0;
		String msgId = "";
		String service = "";
		String username = "";
		String senderid = ""; // GCM Related stuff. should we consider it?
		String sender = null;
		String senderService = null;

		HashMap<String, String> params = new HashMap<String, String>(
				extras.size());

		for (String s : extras) {
			Log.i(TAG, "[" + s + "]=" + intent.getStringExtra(s));
			if (s.equals("uq.")) {
				String[] elems = intent.getStringExtra(s).split(",");
				if (elems.length < 4) {
					// This is not a valid push notification
					return;
				}
				// id,size,service,username,senderService,senderUsername
				msgId = elems[0];
				size = Integer.parseInt(elems[1]);
				service = elems[2];
				username = elems[3];
				
				if (elems.length >= 6) {
					senderService = elems[4];
					sender = elems[5];
				}
			} else if (s.equals("from")) {
				senderid = intent.getStringExtra(s);
			} else {
				params.put(s, intent.getStringExtra(s));
			}
		}

		Intent i = new Intent(context, MessageCenterService.class);
		i.putExtra("c", MessageCenterService.CMD_MESSAGE_DIGEST);
		i.putExtra("params", params);
		i.putExtra("msgId", msgId);
		i.putExtra("service", service);
		i.putExtra("user", username);
		i.putExtra("size", size);
		i.putExtra("senderid", senderid);
		if (sender != null && !sender.equals("")) {
			i.putExtra("sender", sender);
			i.putExtra("senderService", senderService);
		}
		context.startService(i);
	}