|
@@ -79,14 +79,35 @@ public class JPushUtils {
|
|
|
notificationData.setAndroid(notification);
|
|
|
requestBody.setNotification(notificationData);
|
|
|
|
|
|
- Options options = new Options();
|
|
|
- options.setTime_to_live(86400);
|
|
|
- options.setClassification(1);
|
|
|
- options.setThird_party_channel(new Options.ThirdPartyChannel().setHuawei(new Options.Channel().setImportance("NORMAL").setCategory("WORK")));
|
|
|
- options.setThird_party_channel(new Options.ThirdPartyChannel().setXiaomi(new Options.Channel().setChannel_id("NORMAL")));
|
|
|
- options.setThird_party_channel(new Options.ThirdPartyChannel().setHonor(new Options.Channel().setImportance("NORMAL")));
|
|
|
- options.setThird_party_channel(new Options.ThirdPartyChannel().setOppo(new Options.Channel().setChannel_id("message")));
|
|
|
- options.setThird_party_channel(new Options.ThirdPartyChannel().setVivo(new Options.Channel().setDistribution("secondary_push").setCategory("IM")));
|
|
|
+ Options options = Options.builder()
|
|
|
+ .time_to_live(86400)
|
|
|
+ .classification(1)
|
|
|
+ .third_party_channel(Options.ThirdPartyChannel
|
|
|
+ .builder()
|
|
|
+ .huawei(Options.Channel
|
|
|
+ .builder()
|
|
|
+ .importance("NORMAL")
|
|
|
+ .category("WORK")
|
|
|
+ .build())
|
|
|
+ .xiaomi(Options.Channel
|
|
|
+ .builder()
|
|
|
+ .channel_id("NORMAL")
|
|
|
+ .build())
|
|
|
+ .honor(Options.Channel
|
|
|
+ .builder()
|
|
|
+ .importance("NORMAL")
|
|
|
+ .build())
|
|
|
+ .oppo(Options.Channel
|
|
|
+ .builder()
|
|
|
+ .channel_id("message")
|
|
|
+ .build())
|
|
|
+ .vivo(Options.Channel
|
|
|
+ .builder()
|
|
|
+ .distribution("secondary_push")
|
|
|
+ .category("IM")
|
|
|
+ .build())
|
|
|
+ .build())
|
|
|
+ .build();
|
|
|
requestBody.setOptions(options);
|
|
|
|
|
|
return requestBody;
|