if (intent.getAction().equals(ACTION)) {
StringBuilder buf = new StringBuilder();
buf.append("Got data message, action=");
buf.append(ACTION);
Bundle bundle = intent.getExtras();
if (bundle != null) {
if (bundle.getString("poke") != null) {
appendData(buf, "poke", bundle.getString("poke"));
}
if (bundle.getString("question") != null) {
appendData(buf, "question", bundle.getString("question"));
}
}
Log.i(LOG_TAG, "[XmppDataMessageReceiver] onReceiveIntent: " + buf);
NotificationManager nm = (NotificationManager)context.getSystemService(
Context.NOTIFICATION_SERVICE);
nm.notifyWithText(123, buf.toString(),
NotificationManager.LENGTH_LONG, null);
}