public int IOSSetBadge(string applicationId, string deviceToken, int badgeNumber, string sound) { if (string.IsNullOrEmpty(sound)) { sound = "default"; } ConfigurationProps cert = Certificates.Instance.PropertiesFor(applicationId); string payload = string.Format(PAYLOAD_BADGE_FORMAT, badgeNumber, sound); return(IOSNotifications.Send(deviceToken, payload, cert.iOSuseSandboxServer ? IOS_HOST_SANDBOX : IOS_HOST_PROD, cert.iOScertificate, cert.iOScertificatePassword, out m_customError) ? 0 : 3); }
private int SendIOS(string applicationId, string deviceToken, string alert, string action, NotificationParameters props) { if (props == null) { props = new NotificationParameters(); } ConfigurationProps cert = Certificates.Instance.PropertiesFor(applicationId); string payload = string.Format(PAYLOAD_FORMAT, alert, applicationId, action, Certificates.Instance.TypeFor(applicationId), props.ToJson()); return(IOSNotifications.Send(deviceToken, payload, cert.iOSuseSandboxServer ? IOS_HOST_SANDBOX : IOS_HOST_PROD, cert.iOScertificate, cert.iOScertificatePassword, out m_customError) ? 0 : 3); }
public int IOSResetBadge(string applicationId, string deviceToken) { ConfigurationProps cert = Certificates.Instance.PropertiesFor(applicationId); return(IOSNotifications.Send(deviceToken, PAYLOAD_RESET, cert.iOSuseSandboxServer ? IOS_HOST_SANDBOX : IOS_HOST_PROD, cert.iOScertificate, cert.iOScertificatePassword, out m_customError) ? 0 : 3); }