@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)); }
@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); } }
@Override public void setExpire(int ttl) { message.setExpireTime(ttl); }
@Override public void setExtra(Map<String, Object> extra) { message.setCustom(extra); }
@Override public void setText(String text) { message.setContent(text); }
@Override public void setTitle(String title) { message.setTitle(title); }