Skip to content

Commit ead3274

Browse files
KenChoiKenChoi
authored andcommitted
update content-available and mutable-content field
1 parent 29e0e13 commit ead3274

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

example/main/java/cn/jpush/api/examples/PushExample.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import cn.jiguang.common.ServiceHelper;
99
import cn.jiguang.common.connection.ApacheHttpClient;
10+
import cn.jiguang.common.connection.HttpProxy;
1011
import cn.jiguang.common.connection.NativeHttpClient;
1112
import cn.jiguang.common.connection.NettyHttpClient;
1213
import cn.jiguang.common.resp.ResponseWrapper;
@@ -77,8 +78,6 @@ public void onSucceed(ResponseWrapper responseWrapper) {
7778
}
7879

7980
public static void testSendPush() {
80-
// HttpProxy proxy = new HttpProxy("localhost", 3128);
81-
// Can use this https proxy: https://github.com/Exa-Networks/exaproxy
8281
ClientConfig clientConfig = ClientConfig.getInstance();
8382
final JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY, null, clientConfig);
8483
String authCode = ServiceHelper.getBasicAuthorization(APP_KEY, MASTER_SECRET);

src/main/java/cn/jpush/api/push/model/notification/IosNotification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ public JsonElement toJSON() {
102102
}
103103
}
104104
if (contentAvailable) {
105-
json.add(CONTENT_AVAILABLE, new JsonPrimitive(1));
105+
json.add(CONTENT_AVAILABLE, new JsonPrimitive(true));
106106
}
107107
if (null != category) {
108108
json.add(CATEGORY, new JsonPrimitive(category));
109109
}
110110
if (mutableContent) {
111-
json.add(MUTABLE_CONTENT, new JsonPrimitive(1));
111+
json.add(MUTABLE_CONTENT, new JsonPrimitive(true));
112112
}
113113

114114
return json;

src/test/java/cn/jpush/api/device/DeviceNormalRemoteTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
@RunWith(JUnitOrderedRunner.class)
2323
public class DeviceNormalRemoteTest extends BaseTest {
24-
24+
2525
// ------------------ device
2626

2727
@Test
@@ -36,7 +36,7 @@ public void testUpdateDeviceTagAlias_add_remove_tags() throws APIConnectionExcep
3636
DefaultResult result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID1, "alias1", tagsToAdd, tagsToRemove);
3737
assertTrue(result.isResultOK());
3838
}
39-
39+
4040
@Test
4141
@TestOrder(order = 110)
4242
public void testGetDeviceTagAlias_1() throws Exception {

0 commit comments

Comments
 (0)