Esempio n. 1
0
 void RemoveChannelsFromPush(List <string> listChannels, PubNub pubnub, string deviceId, PNPushType pnPushType)
 {
     pubnub.RemovePushNotificationsFromChannels().Channels(listChannels).DeviceID(deviceId).PushType(pnPushType).Async((result, status) => {
         Debug.Log("in RemovePushNotificationsFromChannels");
         if (status.Error)
         {
             Debug.Log(string.Format("In Example, RemovePushNotificationsFromChannels Error: {0} {1} {2}", status.StatusCode, status.ErrorData, status.Category));
         }
         else
         {
             Debug.Log(string.Format("DateTime {0}, In RemovePushNotificationsFromChannels, result: {1}", DateTime.UtcNow, result.Message));
             Display(string.Format("RemovePushNotificationsFromChannels: {0}", result.Message));
         }
     });
     pubnub.RemovePushNotificationsFromChannels().Channels(listChannels).DeviceID(deviceId).PushType(PNPushType.APNS2).Topic("a").Async((result, status) => {
         Debug.Log("in RemovePushNotificationsFromChannels");
         if (status.Error)
         {
             Debug.Log(string.Format("In Example, RemovePushNotificationsFromChannels Error: {0} {1} {2}", status.StatusCode, status.ErrorData, status.Category));
         }
         else
         {
             Debug.Log(string.Format("DateTime {0}, In RemovePushNotificationsFromChannels, result: {1}", DateTime.UtcNow, result.Message));
             Display(string.Format("RemovePushNotificationsFromChannels: {0}", result.Message));
         }
     });
 }