Я использую концентратор уведомлений Azure при отправке push-уведомлений в GCM и APN, что я замечаю, что на производстве он отправляет только 10 зарегистрированным устройствам и другим новым регистрационным устройствам, которые могут получать сообщения, несмотря на он уже зарегистрирован на GCM. то, что мне нужно, - это отправить всем зарегистрированным устройствам, и они оснащены 600 устройствами.MS Azure отправляет уведомление только 10 устройствам
общественный класс Уведомления { public static Уведомления Instance = new Уведомления();
public NotificationHubClient Hub { get; set; }
private Notifications()
{
string NotificationHubConnectionString = WebConfigurationManager.AppSettings["NotificationHubConnectionString"];
string NotificationHubPath = WebConfigurationManager.AppSettings["NotificationHubPath"];
Hub = NotificationHubClient.CreateClientFromConnectionString(NotificationHubConnectionString, NotificationHubPath, false);
}
public static async void SendNotificationAsync(string Message, string Type, string ID, string Date, string Summery, string Location, string Risk)
{
string to_tag = Type.Replace(" ", string.Empty);
try
{
var notif = "{ \"data\" : {\"message\":\"" + Message + "\",\"type\":\"" + Type + "\",\"ID\":\"" + ID + "\",\"Date\":\"" + Date + "\",\"Summery\":\"" + Summery + "\",\"Risk\":\"" + Risk + "\",\"Location\":\"" + Location + "\"" + ", \"sound\" : \"default\"}}";
var outcome = await Notifications.Instance.Hub.SendGcmNativeNotificationAsync(notif);
string msg = string.Format("This Notification: " + Message + " has been delivered to this number [" + outcome.Success.ToString() + "] of android Mobiles");
Logger.LogMessage(msg, EventLogEntryType.Information);
}
catch (Exception ex)
{
string msg = string.Format("Coudn't send notification to android mobiles");
Logger.LogMessage(msg, EventLogEntryType.Error);
Logger.LogException(ex, EventLogEntryType.Error);
}
try
{
var alert = "{\"aps\":{\"alert\":\"" + Message + "\",\"type\":\"" + Type + "\",\"ID\":\"" + ID + "\",\"Date\":\"" + Date + "\",\"Summery\":\"" + Summery + "\",\"Risk\":\"" + Risk + "\",\"location\":\"" + Location + "\" " + ", \"sound\" : \"default\"}}";
var outcome = await Notifications.Instance.Hub.SendAppleNativeNotificationAsync(alert, to_tag);
string msg = string.Format("This Notification: " + Message + " has been delivered to this number ["+ outcome.Success.ToString() +"] of IOS Mobiles");
Logger.LogMessage(msg, EventLogEntryType.Information);
}
catch (Exception ex)
{
string msg = string.Format("Coudn't send notification to IOS mobiles");
Logger.LogMessage(msg, EventLogEntryType.Error);
Logger.LogException(ex, EventLogEntryType.Error);
}
}
Что вы имеете в виду? –