Skip to content

Commit cb99966

Browse files
committed
modify README add code style
1 parent 97cdd70 commit cb99966

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
> 以下片断来自项目代码里的文件:example / cn.jpush.api.examples.PushExample
8888
89-
```
89+
```Java
9090
JPushClient jpushClient = new JPushClient(masterSecret, appKey, 3);
9191

9292
// For push, all you need do is to build PushPayload object.
@@ -114,15 +114,15 @@
114114

115115
* 快捷地构建推送对象:所有平台,所有设备,内容为 ALERT 的通知。
116116

117-
```
117+
```Java
118118
public static PushPayload buildPushObject_all_all_alert() {
119119
return PushPayload.alertAll(ALERT);
120120
}
121121
```
122122

123123
* 构建推送对象:所有平台,推送目标是别名为 "alias1",通知内容为 ALERT。
124124

125-
```
125+
```Java
126126
public static PushPayload buildPushObject_all_alias_alert() {
127127
return PushPayload.newBuilder()
128128
.setPlatform(Platform.all())
@@ -134,7 +134,7 @@
134134

135135
* 构建推送对象:平台是 Android,目标是 tag 为 "tag1" 的设备,内容是 Android 通知 ALERT,并且标题为 TITLE。
136136

137-
```
137+
```Java
138138
public static PushPayload buildPushObject_android_tag_alertWithTitle() {
139139
return PushPayload.newBuilder()
140140
.setPlatform(Platform.android())
@@ -146,7 +146,7 @@
146146

147147
* 构建推送对象:平台是 iOS,推送目标是 "tag1", "tag_all" 的并集,推送内容同时包括通知与消息 - 通知信息是 ALERT,角标数字为 5,通知声音为 "happy",并且附加字段 from = "JPush";消息内容是 MSG_CONTENT。通知是 APNs 推送通道的,消息是 JPush 应用内消息通道的。APNs 的推送环境是“生产”(如果不显式设置的话,Library 会默认指定为开发)
148148

149-
```
149+
```Java
150150
public static PushPayload buildPushObject_ios_tagAnd_alertWithExtrasAndMessage() {
151151
return PushPayload.newBuilder()
152152
.setPlatform(Platform.ios())
@@ -169,7 +169,7 @@
169169

170170
* 构建推送对象:平台是 Andorid 与 iOS,推送目标是 ("tag1" 与 "tag2" 的交集)并("alias1" 与 "alias2" 的交集),推送内容是 - 内容为 MSG_CONTENT 的消息,并且附加字段 from = JPush。
171171

172-
```
172+
```Java
173173
public static PushPayload buildPushObject_ios_audienceMore_messageWithExtras() {
174174
return PushPayload.newBuilder()
175175
.setPlatform(Platform.android_ios())
@@ -189,7 +189,7 @@
189189

190190
> 以下片断来自项目代码里的文件:example / cn.jpush.api.examples.ReportsExample
191191
192-
```
192+
```Java
193193
JPushClient jpushClient = new JPushClient(masterSecret, appKey);
194194
try {
195195
ReceivedsResult result = jpushClient.getReportReceiveds("1942377665");
@@ -212,7 +212,7 @@
212212

213213
> 以下片断来自项目代码里的文件:example / cn.jpush.api.examples.DeviceExample
214214
215-
```
215+
```Java
216216
try {
217217
TagAliasResult result = jpushClient.getDeviceTagAlias(REGISTRATION_ID1);
218218

0 commit comments

Comments
 (0)