Skip to content

Commit af50215

Browse files
committed
Merge pull request #36 from Liuchy1/master
add sms comment
2 parents aac1ac6 + b85641a commit af50215

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

src/main/java/cn/jpush/api/JPushClient.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public PushResult sendNotificationAll(String alert) throws APIConnectionExceptio
213213
* If it doesn't received within the delay time,JPush will send a SMS to the corresponding users.
214214
*
215215
* @param alert The notification content.
216-
* @param sms The SMS content and delay time. If null, it doesn't work.
216+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
217217
* @return push result
218218
* @throws APIConnectionException
219219
* @throws APIRequestException
@@ -243,7 +243,7 @@ public PushResult sendAndroidNotificationWithAlias(String title, String alert,
243243
*
244244
* @param title The notification title.
245245
* @param alert The notification content.
246-
* @param sms The SMS content and delay time. If null, it doesn't work.
246+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
247247
* @param extras The extra parameter.
248248
* @param alias The users' alias.
249249
* @return push result.
@@ -282,7 +282,7 @@ public PushResult sendAndroidNotificationWithRegistrationID(String title, String
282282
*
283283
* @param title The notification title.
284284
* @param alert The notification content.
285-
* @param sms The SMS content and delay time. If null, it doesn't work.
285+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
286286
* @param extras The extra parameter.
287287
* @param registrationID The registration id generated by JPush.
288288
* @return push result.
@@ -319,7 +319,7 @@ public PushResult sendIosNotificationWithAlias(String alert,
319319
* Send a notification to iOS with alias.
320320
* If it doesn't received within the delay time,JPush will send a SMS to the corresponding users.
321321
* @param alert The notification content.
322-
* @param sms The SMS content and delay time. If null, it doesn't work.
322+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
323323
* @param extras The extra parameter.
324324
* @param alias The users' alias.
325325
* @return push result.
@@ -366,7 +366,7 @@ public PushResult sendIosNotificationWithAlias(IosAlert alert,
366366
* If it doesn't received within the delay time,JPush will send a SMS to the corresponding users.
367367
*
368368
* @param alert The wrapper of APNs alert.
369-
* @param sms The SMS content and delay time. If null, it doesn't work.
369+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
370370
* @param extras The extra params.
371371
* @param alias The alias list.
372372
* @return push result.
@@ -413,7 +413,7 @@ public PushResult sendIosNotificationWithAlias(JsonObject alert,
413413
* If it doesn't received within the delay time,JPush will send a SMS to the corresponding users.
414414
*
415415
* @param alert The JSON object of APNs alert.
416-
* @param sms The SMS content and delay time. If null, it doesn't work.
416+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
417417
* @param extras The extra params.
418418
* @param alias The alias list.
419419
* @return push result.
@@ -451,7 +451,7 @@ public PushResult sendIosNotificationWithRegistrationID(String alert,
451451
* If it doesn't received within the delay time,JPush will send a SMS to the corresponding users.
452452
*
453453
* @param alert The notification content.
454-
* @param sms The SMS content and delay time. If null, it doesn't work.
454+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
455455
* @param extras The extra params.
456456
* @param registrationID The alias list.
457457
* @return push result.
@@ -498,7 +498,7 @@ public PushResult sendIosNotificationWithRegistrationID(IosAlert alert,
498498
* If it doesn't received within the delay time,JPush will send a SMS to the corresponding users.
499499
*
500500
* @param alert The wrapper of APNs alert.
501-
* @param sms The SMS content and delay time. If null, it doesn't work.
501+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
502502
* @param extras The extra params.
503503
* @param registrationID The registration ids.
504504
* @return push result.
@@ -545,7 +545,7 @@ public PushResult sendIosNotificationWithRegistrationID(JsonObject alert,
545545
* If it doesn't received within the delay time,JPush will send a SMS to the corresponding users.
546546
*
547547
* @param alert The JSON object of APNs alert.
548-
* @param sms The SMS content and delay time. If null, it doesn't work.
548+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
549549
* @param extras The extra params.
550550
* @param registrationID The registration ids.
551551
* @return push result.
@@ -580,7 +580,7 @@ public PushResult sendMessageAll(String msgContent) throws APIConnectionExceptio
580580
* If it doesn't received within the delay time,JPush will send a SMS to the corresponding users.
581581
*
582582
* @param msgContent The message content.
583-
* @param sms The SMS content and delay time. If null, it doesn't work.
583+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
584584
* @return push result.
585585
* @throws APIConnectionException
586586
* @throws APIRequestException
@@ -612,7 +612,7 @@ public PushResult sendAndroidMessageWithAlias(String title, String msgContent, S
612612
*
613613
* @param title The message title.
614614
* @param msgContent The message content.
615-
* @param sms The SMS content and delay time. If null, it doesn't work.
615+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
616616
* @param alias The alias list.
617617
* @return push result.
618618
* @throws APIConnectionException
@@ -654,7 +654,7 @@ public PushResult sendAndroidMessageWithRegistrationID(String title, String msgC
654654
*
655655
* @param title The message title.
656656
* @param msgContent The message content.
657-
* @param sms The SMS content and delay time. If null, it doesn't work.
657+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
658658
* @param registrationID The registration id list.
659659
* @return push result.
660660
* @throws APIConnectionException
@@ -696,7 +696,7 @@ public PushResult sendIosMessageWithAlias(String title, String msgContent, Strin
696696
*
697697
* @param title The message title.
698698
* @param msgContent The message content.
699-
* @param sms The SMS content and delay time. If null, it doesn't work.
699+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
700700
* @param alias The alias list.
701701
* @return push result.
702702
* @throws APIConnectionException
@@ -738,7 +738,7 @@ public PushResult sendIosMessageWithRegistrationID(String title, String msgConte
738738
*
739739
* @param title The message title.
740740
* @param msgContent The message content.
741-
* @param sms The SMS content and delay time. If null, it doesn't work.
741+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
742742
* @param registrationID The registrationIds generated by JPush.
743743
* @return push result.
744744
* @throws APIConnectionException
@@ -780,7 +780,7 @@ public PushResult sendMessageWithRegistrationID(String title, String msgContent,
780780
*
781781
* @param title The message title.
782782
* @param msgContent The message content.
783-
* @param sms The SMS content and delay time. If null, it doesn't work.
783+
* @param sms The SMS content and delay time. If null, sms doesn't work, no effect on Push feature.
784784
* @param registrationID The registrationIds generated by JPush.
785785
* @return push result.
786786
* @throws APIConnectionException

src/main/java/cn/jpush/api/common/connection/NativeHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ protected void initSSL() {
261261
TrustManager[] tmCerts = new javax.net.ssl.TrustManager[1];
262262
tmCerts[0] = new SimpleTrustManager();
263263
try {
264-
SSLContext sslContext = SSLContext.getInstance("TLSv1");
264+
SSLContext sslContext = SSLContext.getInstance("TLSv1.1");
265265
sslContext.init(null, tmCerts, null);
266266
HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
267267

src/main/java/cn/jpush/api/push/model/SMS.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ public Builder newBuilder() {
2020
}
2121

2222
/**
23-
* Create a SMS content.
23+
* Create a SMS content with a delay time.
24+
* JPush will send a SMS if the message doesn't received within the delay time. If the delay time is 0, the SMS will be sent immediately.
25+
* Please note the delay time only works on Android.
26+
* If you are pushing to iOS, the SMS will be sent immediately, whether or not the delay time is 0.
27+
*
2428
* @param content The SMS content.
2529
* @param delayTime The seconds you want to delay, should be greater than or equal to 0.
2630
* @return

0 commit comments

Comments
 (0)