0

I am trying to use PushSharp to send notification to my mobile devices using Google Gcm. I downloaded the sample application from github depending upon that I have written my sample code. below is my sample code.

var googleKey = CustomConfigurationManager.GetValueFromSection("appSettings", "GoogleServerAccessKey");
            AndroidPushBroker.RegisterGcmService(new PushSharp.Android.GcmPushChannelSettings(googleKey));

            GcmNotification androidNotifcation = new GcmNotification().WithDryRun()
                .WithJson("{\"alert\":\"Hello World!\",\"badge\":7,\"sound\":\"sound.caf\"}");
            AndroidPushBroker.QueueNotification(androidNotifcation);

The issue is though I have used WithDryRun() and upon hooking up request it shows json data with "dry_run": true, but still I receive Notification failed error with reason : "Notification send timed out".

Anybody can tell me what am I missing ?

Sumit
  • 2,932
  • 6
  • 32
  • 54

1 Answers1

-1

try to run it without WithDryRun(), and see do you get anything in events like NotificationSent, ChannelException, NotificationFailed or ServiceException.

chopper
  • 6,649
  • 7
  • 36
  • 53
Malkit Singh
  • 349
  • 1
  • 8