这是我现在的推送代码
private PushPayload buildPushObject_android_and_ios(
String notification_title, String msg_title, String msg_content, String extrasparam) {
return PushPayload.newBuilder()
.setPlatform(Platform.android_ios())
.setAudience(Audience.all())
.setNotification(Notification.newBuilder()
.setAlert(notification_title)
.addPlatformNotification(AndroidNotification.newBuilder()
.setAlert(msg_title)
.setTitle(notification_title)
.setStyle(3)//通知栏样式类型 bigPicture=3。
.setBigPicPath("https://push/20171016/1508147285378032832.jpg") //当 style = 3 时可用,可以是网络图片 url,或本地图片的 path,目前支持.jpg和.png后缀的图片。
.addExtra("url",extrasparam)
.build()
)
.addPlatformNotification(IosNotification.newBuilder()
.setAlert(notification_title)
.incrBadge(1)
//.setSound("sound.caf")
.addExtra("url",extrasparam)
.build()
)
.build()
)
.setMessage(Message.newBuilder()
.setMsgContent(msg_content)
.setTitle(notification_title)
.addExtra("url",extrasparam)
.build())
.setOptions(Options.newBuilder()
.setApnsProduction(jPushConfig.getApns())
.setSendno(1)
.setTimeToLive(86400)
.build()
)
.build();
}
请教大牛们