【问题标题】:PushSharp Push doesn't process queue until stopPushSharp Push 直到停止才处理队列
【发布时间】:2012-11-25 17:43:18
【问题描述】:

PushSharp 仅在调用 stop 时处理队列。有谁知道 push sharp 将多久处理一次队列或刷新它?我不想每次要发送通知以节省资源时都必须调用停止和启动。

            pushService = new PushService();
            pushService.StartApplePushService(new ApplePushChannelSettings(prod,  cert.InputStream.ReadToEnd(), passConfig.Value));
  pushService.QueueNotification(
                NotificationFactory.Apple().ForDeviceToken("mydeviceid").WithAlert("Notifications Started!").WithSound("default").WithBadge(7));


            pushService.StopAllServices(true);

【问题讨论】:

    标签: ios c#-4.0 apple-push-notifications pushsharp


    【解决方案1】:

    我是个彻头彻尾的白痴……

    在队列计时器可以处理通知之前,主线程已完成执行。 StopAllServices 迫使线程等待......也许这会帮助其他人。

    【讨论】:

      猜你喜欢
      • 2018-09-27
      • 1970-01-01
      • 1970-01-01
      • 2020-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多