public class SmsMultiSender extends SmsBase
appid, appkey, httpclient| Constructor and Description |
|---|
SmsMultiSender(int appid,
String appkey) |
SmsMultiSender(int appid,
String appkey,
HTTPClient httpclient) |
| Modifier and Type | Method and Description |
|---|---|
SmsMultiSenderResult |
send(int type,
String nationCode,
ArrayList<String> phoneNumbers,
String msg,
String extend,
String ext)
普通群发
明确指定内容,如果有多个签名,请在内容中以【】的方式添加到信息内容中,否则系统将使用默认签名
|
SmsMultiSenderResult |
send(int type,
String nationCode,
String[] phoneNumbers,
String msg,
String extend,
String ext) |
SmsMultiSenderResult |
sendWithParam(String nationCode,
ArrayList<String> phoneNumbers,
int templateId,
ArrayList<String> params,
String sign,
String extend,
String ext)
指定模板群发
|
SmsMultiSenderResult |
sendWithParam(String nationCode,
String[] phoneNumbers,
int templateId,
String[] params,
String sign,
String extend,
String ext) |
handleErrorpublic SmsMultiSender(int appid,
String appkey)
public SmsMultiSender(int appid,
String appkey,
HTTPClient httpclient)
public SmsMultiSenderResult send(int type, String nationCode, ArrayList<String> phoneNumbers, String msg, String extend, String ext) throws HTTPException, org.json.JSONException, IOException
type - 短信类型,0 为普通短信,1 营销短信nationCode - 国家码,如 86 为中国phoneNumbers - 不带国家码的手机号列表msg - 信息内容,必须与申请的模板格式一致,否则将返回错误extend - 扩展码,可填空ext - 服务端原样返回的参数,可填空HTTPException - http status exceptionorg.json.JSONException - json parse exceptionIOException - network problempublic SmsMultiSenderResult send(int type, String nationCode, String[] phoneNumbers, String msg, String extend, String ext) throws HTTPException, org.json.JSONException, IOException
HTTPExceptionorg.json.JSONExceptionIOExceptionpublic SmsMultiSenderResult sendWithParam(String nationCode, ArrayList<String> phoneNumbers, int templateId, ArrayList<String> params, String sign, String extend, String ext) throws HTTPException, org.json.JSONException, IOException
nationCode - 国家码,如 86 为中国phoneNumbers - 不带国家码的手机号列表templateId - 模板 idparams - 模板参数列表sign - 签名,如果填空,系统会使用默认签名extend - 扩展码,可以填空ext - 服务端原样返回的参数,可以填空HTTPException - http status exceptionorg.json.JSONException - json parse exceptionIOException - network problempublic SmsMultiSenderResult sendWithParam(String nationCode, String[] phoneNumbers, int templateId, String[] params, String sign, String extend, String ext) throws HTTPException, org.json.JSONException, IOException
HTTPExceptionorg.json.JSONExceptionIOExceptionCopyright © 2018. All rights reserved.