如何取出极光推送的通知的内容,我试了好久,找不到怎么取出来,我是想取出所有的消息的内容,保存到本地自定义的消息中心。
怪我咯2017-04-17 17:35:21
You print the returned json format String. If there is a value, it means there is a problem with your value method. Try fastJson or GSON
迷茫2017-04-17 17:35:21
if (JPushInterface.ACTION_MESSAGE_RECEIVED.equals(action)) {
Bundle extras = intent.getExtras();
if (null == extras)
return;
String title = extras.getString(JPushInterface.EXTRA_TITLE);
String message = extras.getString(JPushInterface.EXTRA_MESSAGE);
String extraJson = extras.getString(JPushInterface.EXTRA_EXTRA);
LogUtils.d("Message title : " + title);
LogUtils.d("Message content : " + message);
LogUtils.d("Message extraJson : " + extraJson);
}
怪我咯2017-04-17 17:35:21
I also encountered this problem. This is how to get the content of the notification:
String result = bundle.getString(JPushInterface.EXTRA_ALERT);