|
|
@@ -51,6 +51,7 @@ public class JGMessageHelper implements InitializingBean, DisposableBean{
|
|
|
private static final Logger logger = LoggerFactory.getLogger(JGMessageHelper.class);
|
|
|
private static final int MAX_TRYCOUNT = 3;
|
|
|
private static final String MESSAGE_ID = "message_id";//消息ID
|
|
|
+ private static final String MESSAGE_TITLE = "message_title";//消息ID
|
|
|
private static final String MESSAGE_BODY = "message_body";//消息ID
|
|
|
private static final String RESOURCE_ID = "resource_id";//资源ID
|
|
|
private static final String RESOURCE_TYPE = "resource_type";//资源类型
|
|
|
@@ -126,6 +127,7 @@ public class JGMessageHelper implements InitializingBean, DisposableBean{
|
|
|
.setNotification(Notification.newBuilder()
|
|
|
.addPlatformNotification(AndroidNotification.newBuilder()
|
|
|
.addExtra(MESSAGE_ID, mp.getId())
|
|
|
+ .addExtra(MESSAGE_TITLE, mp.getTitle())
|
|
|
.addExtra(MESSAGE_BODY, mp.getBody())
|
|
|
.addExtra(RESOURCE_ID, mp.getResourceId() == null ? "" : mp.getResourceId())
|
|
|
.addExtra(RESOURCE_TYPE, mp.getResourceType() == null ? "":mp.getResourceType().toString()).build())
|
|
|
@@ -133,6 +135,7 @@ public class JGMessageHelper implements InitializingBean, DisposableBean{
|
|
|
.incrBadge(1)
|
|
|
.setContentAvailable(true)
|
|
|
.addExtra(MESSAGE_ID, mp.getId())
|
|
|
+ .addExtra(MESSAGE_TITLE, mp.getTitle())
|
|
|
.addExtra(MESSAGE_BODY, mp.getBody())
|
|
|
.addExtra(RESOURCE_ID, mp.getResourceId() == null ? "" : mp.getResourceId())
|
|
|
.addExtra(RESOURCE_TYPE, mp.getResourceType()== null ? "": mp.getResourceType().toString()).build())
|