public void setPushInfo(String actionLocKey, int badge, String message, String sound, String payload, String locKey, String locArgs, String launchImage) { PushInfo.Builder builder = PushInfo.CreateBuilder().SetActionLocKey(actionLocKey).SetBadge(Convert.ToString(badge)).SetMessage(message); if (sound != null) { builder.SetSound(sound); } if (payload != null) { builder.SetPayload(payload); } if (locKey != null) { builder.SetLocKey(locKey); } if (locArgs != null) { builder.SetLocArgs(locArgs); } if (launchImage != null) { builder.SetLaunchImage(launchImage); } pushInfo = builder.Build(); }
public PushInfo getPushInfo() { if (pushInfo == null) { pushInfo = PushInfo.CreateBuilder() .SetActionKey("") .SetBadge("") .SetMessage("") .SetSound("") .Build(); } return(pushInfo); }