public class JiGuangNoticeUtilImpl extends Object implements NoticeUtil
| Constructor and Description |
|---|
JiGuangNoticeUtilImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAppKey() |
String |
getMasterSecret() |
static void |
main(String[] args) |
void |
pushMessae(String channelId,
String title,
String message,
Integer deviceType,
Integer messageType,
Integer msgExpires,
String custom_content) |
String |
pushMessaeForList(String platform,
String displayType,
String type,
String deviceTokens,
String ticker,
String title,
String text,
String afterOpen,
String url,
String activity,
String custom,
String extra,
String out_biz_no,
Boolean production_mode,
Long start_time,
Long expire_time,
String description)
发送群体消息
|
void |
setAppKey(String appKey) |
void |
setMasterSecret(String masterSecret) |
public String getAppKey()
public void setAppKey(String appKey)
public String getMasterSecret()
public void setMasterSecret(String masterSecret)
public void pushMessae(String channelId, String title, String message, Integer deviceType, Integer messageType, Integer msgExpires, String custom_content)
pushMessae in interface NoticeUtilchannelId - channelIdtitle - 标题message - 具体信息deviceType - //设置设备类型,deviceType => 1 for web, 2 for pc,
//3 for android, 4 for ios, 5 for wp.messageType - //设置消息类型,0表示透传消息,1表示通知,默认为0.msgExpires - //消息的有效时间 最大是7天public String pushMessaeForList(String platform, String displayType, String type, String deviceTokens, String ticker, String title, String text, String afterOpen, String url, String activity, String custom, String extra, String out_biz_no, Boolean production_mode, Long start_time, Long expire_time, String description) throws IOException
pushMessaeForList in interface NoticeUtilplatform - !必填 设备 android iosdisplayType - !必填 消息类型 notification-通知,message-消息type - !必填 消息发送类型,其值可以为: "unicast" (单播), "listcast" (列播)deviceTokens - !必填 设备绑定的别名 当 type=unicast 时, 一个值; 当 type=listcast 时, 多个之间逗号隔开, 要求不超过 1000 个ticker - // 没有用到 通知栏提示文字title - ?可选 通知标题text - !必填 通知内容afterOpen - // 没有用到 值可以为: "go_app": 打开应用 "go_url": 跳转到URL "go_activity": 打开特定的activityurl - // 没有用到 当"after_open"为"go_url"时,必填。通知栏点击后跳转的URL,要求以http或者https开头activity - // 没有用到 当"after_open"为"go_activity"时,必填。通知栏点击后打开的Activitycustom - // 没有用到extra - ?可选 用户自定义 key-value json 格式 对 message-消息 也有效果start_time - // 定时发送时间,若不填写表示立即发送。out_biz_no - // 开发者对消息的唯一标识,服务器会根据这个标识避免重复发送production_mode - ?可选 "true"/"false" (生产环境 / 开发环境) 不指定则为 生产环境expire_time - ?可选 消息过期时间 这里是具体时间的毫秒值description - // 没有用到 发送消息描述IOExceptionpublic static void main(String[] args)
Copyright © 2022. All rights reserved.