File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/cn/jpush/api/examples Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -144,23 +144,24 @@ maven package
144144
145145* 构建推送对象:平台是 iOS,推送目标是 "tag1", "tag_all" 的并集,推送内容同时包括通知与消息 - 通知信息是 ALERT,并且附加字段 from = "JPush";消息内容是 MSG_CONTENT。通知是 APNs 推送通道的,消息是 JPush 应用内消息通道的。
146146```
147- public static PushPayload buildPushObject_ios_tagAnd_alertWithExtras () {
147+ public static PushPayload buildPushObject_ios_tagAnd_alertWithExtrasAndMessage () {
148148 return PushPayload.newBuilder()
149149 .setPlatform(Platform.ios())
150150 .setAudience(Audience.tag_and("tag1", "tag_all"))
151151 .setNotification(Notification.newBuilder()
152152 .addPlatformNotification(IosNotification.newBuilder()
153153 .setAlert(ALERT)
154- .addExtra("from ", "JPush" )
154+ .addExtra("news_id ", 333 )
155155 .build())
156156 .build())
157+ .setMessage(Message.content(MSG_CONTENT))
157158 .build();
158159 }
159160```
160161
161162* 构建推送对象:平台是 Andorid 与 iOS,推送目标是 ("tag1" 与 "tag2" 的交集)并("alias1" 与 "alias2" 的交集),推送内容是 - 内容为 MSG_CONTENT 的消息,并且附加字段 from = JPush。
162163```
163- public static PushPayload buildPushObject_ios_audienceMore_message () {
164+ public static PushPayload buildPushObject_ios_audienceMore_messageWithExtras () {
164165 return PushPayload.newBuilder()
165166 .setPlatform(Platform.android_ios())
166167 .setAudience(Audience.newBuilder()
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public static PushPayload buildPushObject_android_tag_alertWithTitle() {
7676 .build ();
7777 }
7878
79- public static PushPayload buildPushObject_ios_tagAnd_alertWithExtras () {
79+ public static PushPayload buildPushObject_ios_tagAnd_alertWithExtrasAndMessage () {
8080 return PushPayload .newBuilder ()
8181 .setPlatform (Platform .ios ())
8282 .setAudience (Audience .tag_and ("tag1" , "tag_all" ))
@@ -90,7 +90,7 @@ public static PushPayload buildPushObject_ios_tagAnd_alertWithExtras() {
9090 .build ();
9191 }
9292
93- public static PushPayload buildPushObject_ios_audienceMore_message () {
93+ public static PushPayload buildPushObject_ios_audienceMore_messageWithExtras () {
9494 return PushPayload .newBuilder ()
9595 .setPlatform (Platform .android_ios ())
9696 .setAudience (Audience .newBuilder ()
You can’t perform that action at this time.
0 commit comments