如何取出极光推送的通知的内容,我试了好久,找不到怎么取出来,我是想取出所有的消息的内容,保存到本地自定义的消息中心。
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
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); }
I also encountered this problem. This is how to get the content of the notification: String result = bundle.getString(JPushInterface.EXTRA_ALERT);
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
I also encountered this problem. This is how to get the content of the notification:
String result = bundle.getString(JPushInterface.EXTRA_ALERT);