I am new to Push Sharp. I am trying to send messages to Android devices using Push Sharp. It works great but the problem is that Push Sharp is sending same message again and again.
My Code is:
AndroidPushBroker = new PushBroker();
var googleKey = CustomConfigurationManager.GetValueFromSection("appSettings", "GoogleServerAccessKey");
AndroidPushBroker.RegisterGcmService(new PushSharp.Android.GcmPushChannelSettings(googleKey));
var jsonMessage = "{\"InformationId\":\"" + notification.Message + "\",\"badge\":7,\"sound\":\"sound.caf\",\"NotificationType\":\"" + notification.Type.ToString() + "\"}";
GcmNotification androidNotifcation = new GcmNotification().ForDeviceRegistrationId(notification.DeviceId)
.WithJson(jsonMessage);
AndroidPushBroker.QueueNotification(androidNotifcation);
Issue: When i send message "Message 1" and then later on send "Message 2", it sends "Message 1" again. Do I need to remove items from Queue ? Or what am I missing. ?
Note: I have single instance of Push Broker in my application.