示例#1
0
 @Override
 public void initialize(String appId, String privateKey) {
   app = new XingeApp(Long.parseLong(appId), privateKey);
   message = new Message();
   message.setAction(new ClickAction());
   message.setStyle(new Style(0, 1, 1, 1, 0));
 }
示例#2
0
 @Override
 public void setType(Type type) {
   switch (type) {
     case TYPE_APP:
       message.setType(Message.TYPE_MESSAGE);
       break;
     case TYPE_SMS:
       message.setType(Message.TYPE_NOTIFICATION);
   }
 }
示例#3
0
 @Override
 public void setExpire(int ttl) {
   message.setExpireTime(ttl);
 }
示例#4
0
 @Override
 public void setExtra(Map<String, Object> extra) {
   message.setCustom(extra);
 }
示例#5
0
 @Override
 public void setText(String text) {
   message.setContent(text);
 }
示例#6
0
 @Override
 public void setTitle(String title) {
   message.setTitle(title);
 }