private static PushPayload buildPushObject_android_tag_alertWithTitle(String alert) { return PushPayload.newBuilder() .setPlatform(Platform.android()) .setAudience(Audience.tag("profit4all")) .setNotification(Notification.android(alert, TITLE, null)) .build(); }
/** * 构建推送对象:平台是 Android,目标是 tag 为 "tag1" 的设备,内容是 Android 通知 ALERT,并且标题为 TITLE。 * * @return */ private static PushPayload buildPushObject_android_tag_alertWithTitle( String target, String title, String message) { return PushPayload.newBuilder() .setPlatform(Platform.android()) .setAudience(Audience.tag(target)) .setNotification(Notification.android(title, message, null)) .build(); }