Skip to content

Commit c163700

Browse files
author
Javen
committed
Add some comments.
1 parent ad10278 commit c163700

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
<artifactId>slf4j-api</artifactId>
3939
<version>1.7.5</version>
4040
</dependency>
41-
<dependency>
42-
<groupId>ch.qos.logback</groupId>
43-
<artifactId>logback-core</artifactId>
44-
<version>1.0.13</version>
45-
</dependency>
4641
<dependency>
4742
<groupId>ch.qos.logback</groupId>
4843
<artifactId>logback-classic</artifactId>

resources/jpush-api.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ masterSecret=2b38ce69b1de2a7fa95706ea
77

88
alias=alias_api
99
tag=tag_api
10-
registrationID=0900e8d85ef
10+
registrationID=0900e8d85ef
11+

src/cn/jpush/api/JPushClient.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,33 @@ public class JPushClient {
2020
private PushClient _pushClient;
2121
private ReportClient _reportClient;
2222

23+
/**
24+
* Create a JPush Client.
25+
* Use some defaults - time_to_live:1 day; platform:all platforms; apnsProduction:true.
26+
*
27+
* @param masterSecret API access secret of the app_key.
28+
* @param appKey The app_key of one application on JPush
29+
*/
2330
public JPushClient(String masterSecret, String appKey) {
24-
this(masterSecret, appKey, MessageParams.NO_TIME_TO_LIVE, null, false);
31+
this(masterSecret, appKey, MessageParams.NO_TIME_TO_LIVE, null, true);
2532
}
2633

34+
/**
35+
* Create a JPush Client.
36+
* With defined sending push params.
37+
*
38+
* @param masterSecret API access secret of the app_key.
39+
* @param appKey The app_key of one application on JPush.
40+
* @param timeToLive The off-line message live time long.
41+
* @param device The target device of the push. If null will send to all platforms.
42+
* @param apnsProduction If iOS push which environment should be use for sending APNs.
43+
*/
2744
public JPushClient(String masterSecret, String appKey, long timeToLive, DeviceEnum device, boolean apnsProduction) {
2845
_pushClient = new PushClient(masterSecret, appKey, timeToLive, device, apnsProduction);
2946
_reportClient = new ReportClient(masterSecret, appKey);
3047
}
3148

49+
3250
public MessageResult sendNotification(String notificationContent, NotificationParams params, Map<String, Object> extras) {
3351
return _pushClient.sendNotification(notificationContent, params, extras);
3452
}

0 commit comments

Comments
 (0)