@@ -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