Example #1
0
        /// <summary>
        /// Send message to GCM server asynchronously
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public async Task<string> SendAsync(IGCM message)
        {

            string data = message.ToJson();


            return await sendAsync(message);
        }
Example #2
0
 protected void OnError(IGCM message, Exception ex)
 {
     if (onError != null)
     {
         onError(_Key, new PushServerErrorEventArgs() { SendingData = message, Exception = ex });
     }
 }
Example #3
0
 /// <summary>
 /// Send message to GCM server
 /// </summary>
 /// <param name="message">represents message</param>
 /// <returns></returns>
 public string Send(IGCM message)
 {
     return send(message);
 }
Example #4
0
 protected void OnSuccess(IGCM message, string response)
 {
     if (onSuccess != null)
     {
         onSuccess(_Key, new PushServerEventArgs() { SendingData = message, Response = response});
     }
 }