<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          PushSharp移動(dòng)消息推送庫(kù)

          聯(lián)合創(chuàng)作 · 2023-09-25 04:57

          PushSharp 實(shí)現(xiàn)了服務(wù)器端向移動(dòng)客戶端推送消息的庫(kù),支持 iOS (iPhone/iPad APNS), Android (C2DM and GCM - Google Cloud Message), Windows Phone, 和  Windows 8 devices!

          示例代碼:

          //Create our push services broker
          var push = new PushBroker();
          
          //Registering the Apple Service and sending an iOS Notification
          var appleCert = File.ReadAllBytes("ApnsSandboxCert.p12"));
          push.RegisterAppleService(new ApplePushChannelSettings(appleCert, "pwd"));
          push.QueueNotification(new AppleNotification()
                                     .ForDeviceToken("DEVICE TOKEN HERE")
                                     .WithAlert("Hello World!")
                                     .WithBadge(7)
                                     .WithSound("sound.caf"));
          
          
          //Registering the GCM Service and sending an Android Notification
          push.RegisterGcmService(new GcmPushChannelSettings("theauthorizationtokenhere"));
          //Fluent construction of an Android GCM Notification
          //IMPORTANT: For Android you MUST use your own RegistrationId here that gets generated within your Android app itself!
          push.QueueNotification(new GcmNotification().ForDeviceRegistrationId("DEVICE REGISTRATION ID HERE")
                                .WithJson("{\"alert\":\"Hello World!\",\"badge\":7,\"sound\":\"sound.caf\"}"));
          瀏覽 16
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  中文最新天堂8√ | 黄网站在线视频不卡 | 亚洲国产色情视频 | 看中国毛片 | 免费无码不卡视频在线观看 |