void CallPushAccepted(Notification.PushMessage pushMessage)
 {
     new Handler(ApplicationContext.MainLooper).Post(() =>
     {
         PushManager.Instance.OnPushAccepted(PushManager.NotificationFromNative(pushMessage), !IsAppOnForeground);
     });
 }
 bool CallPushReceived(Notification.PushMessage pushMessage)
 {
     new Handler(ApplicationContext.MainLooper).Post(() =>
     {
         PushManager.Instance.OnPushReceived(PushManager.NotificationFromNative(pushMessage), !IsAppOnForeground);
     });
     return(IsAppOnForeground && !PushManager.Instance.ShowPushNotificationAlerts);
 }
Example #3
0
 public static PushNotification NotificationFromNative(Notification.PushMessage message)
 {
     return(new PushNotification()
     {
         Payload = message.ToJson().ToString(),
         Title = message.Header,
         Message = message.Message,
         CustomData = message.CustomData
     });
 }
 protected override void OnMessageOpened(Notification.PushMessage pushMessage)
 {
     base.OnMessageOpened(pushMessage);
     if (PushManager.Instance == null)
     {
         rememberedOpenedPushes.Add(pushMessage);
         PushManager.InitFinished += OnPushwooshInitialized;
     }
     else
     {
         CallPushAccepted(pushMessage);
     }
 }
 protected override bool OnMessageReceived(Notification.PushMessage pushMessage)
 {
     base.OnMessageReceived(pushMessage);
     if (PushManager.Instance == null)
     {
         rememberedReceivedPushes.Add(pushMessage);
         PushManager.InitFinished += OnPushwooshInitialized;
         return(false);
     }
     else
     {
         return(CallPushReceived(pushMessage));
     }
 }