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
144
144
145
145
* 构建推送对象:平台是 iOS,推送目标是 "tag1", "tag_all" 的并集,推送内容同时包括通知与消息 - 通知信息是 ALERT,并且附加字段 from = "JPush";消息内容是 MSG_CONTENT。通知是 APNs 推送通道的,消息是 JPush 应用内消息通道的。
146
146
```
147
- public static PushPayload buildPushObject_ios_tagAnd_alertWithExtras () {
147
+ public static PushPayload buildPushObject_ios_tagAnd_alertWithExtrasAndMessage () {
148
148
return PushPayload.newBuilder()
149
149
.setPlatform(Platform.ios())
150
150
.setAudience(Audience.tag_and("tag1", "tag_all"))
151
151
.setNotification(Notification.newBuilder()
152
152
.addPlatformNotification(IosNotification.newBuilder()
153
153
.setAlert(ALERT)
154
- .addExtra("from ", "JPush" )
154
+ .addExtra("news_id ", 333 )
155
155
.build())
156
156
.build())
157
+ .setMessage(Message.content(MSG_CONTENT))
157
158
.build();
158
159
}
159
160
```
160
161
161
162
* 构建推送对象:平台是 Andorid 与 iOS,推送目标是 ("tag1" 与 "tag2" 的交集)并("alias1" 与 "alias2" 的交集),推送内容是 - 内容为 MSG_CONTENT 的消息,并且附加字段 from = JPush。
162
163
```
163
- public static PushPayload buildPushObject_ios_audienceMore_message () {
164
+ public static PushPayload buildPushObject_ios_audienceMore_messageWithExtras () {
164
165
return PushPayload.newBuilder()
165
166
.setPlatform(Platform.android_ios())
166
167
.setAudience(Audience.newBuilder()
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public static PushPayload buildPushObject_android_tag_alertWithTitle() {
76
76
.build ();
77
77
}
78
78
79
- public static PushPayload buildPushObject_ios_tagAnd_alertWithExtras () {
79
+ public static PushPayload buildPushObject_ios_tagAnd_alertWithExtrasAndMessage () {
80
80
return PushPayload .newBuilder ()
81
81
.setPlatform (Platform .ios ())
82
82
.setAudience (Audience .tag_and ("tag1" , "tag_all" ))
@@ -90,7 +90,7 @@ public static PushPayload buildPushObject_ios_tagAnd_alertWithExtras() {
90
90
.build ();
91
91
}
92
92
93
- public static PushPayload buildPushObject_ios_audienceMore_message () {
93
+ public static PushPayload buildPushObject_ios_audienceMore_messageWithExtras () {
94
94
return PushPayload .newBuilder ()
95
95
.setPlatform (Platform .android_ios ())
96
96
.setAudience (Audience .newBuilder ()
You can’t perform that action at this time.
0 commit comments