Esempio n. 1
0
        private void OnSendPush(object args)
        {
            this.BusyMessage = "Sending push notification";
            this.IsBusy      = true;
            IDictionary <String, String> notification = new Dictionary <String, String>();

            notification.Add("X-NotificationClass", "2");
            notification.Add("X-WindowsPhone-Target", "toast");
            notification.Add("Text1", "Push received!");
            notification.Add("Text2", "Wp7 device greets all users.");
            notification.Add("Param", "/View/MainPage.xaml");
            notification.Add("alert", "Wp7 device greets all users.");
            Mobeelizer.SendRemoteNotification(notification, (error) =>
            {
                this.IsBusy = false;
                if (error != null)
                {
                    this.navigationService.ShowMessage(Resources.Errors.e_title, "Unable to send push notification.");
                }
            });
        }