Exemplo n.º 1
0
Arquivo: Push.cs Projeto: ManjuBP/.net
 static Push()
 {
     _pushDelegate.OnPushNotificationReceivedAction = notification =>
     {
         var pushEventArgs = new PushNotificationReceivedEventArgs
         {
             Title      = notification.Title,
             Message    = notification.Message,
             CustomData = notification.CustomData?.ToDictionary(i => i.Key.ToString(), i => i.Value.ToString())
         };
         PushNotificationReceived?.Invoke(null, pushEventArgs);
     };
     MSPush.SetDelegate(_pushDelegate);
 }
Exemplo n.º 2
0
 static Push()
 {
     _pushDelegate.OnPushNotificationReceivedAction = notification =>
     {
         var pushEventArgs = new PushNotificationReceivedEventArgs
         {
             Title      = notification.Title,
             Message    = notification.Message,
             CustomData = NSDictionaryToDotNet(notification.CustomData)
         };
         PushNotificationReceived?.Invoke(null, pushEventArgs);
     };
     MSPush.SetDelegate(_pushDelegate);
 }
Exemplo n.º 3
0
 public override void ReceivedPushNotification(MSPush push, MSPushNotification pushNotification)
 {
     OnPushNotificationReceivedAction?.Invoke(pushNotification);
 }
Exemplo n.º 4
0
Arquivo: Push.cs Projeto: ManjuBP/.net
 public static bool DidReceiveRemoteNotification(NSDictionary userInfo)
 {
     return(MSPush.DidReceiveRemoteNotification(userInfo));
 }
Exemplo n.º 5
0
Arquivo: Push.cs Projeto: ManjuBP/.net
 /// <summary>
 /// Call this from the corresponding method override in your AppDelegate.
 /// </summary>
 /// <param name="error">Associated error.</param>
 public static void FailedToRegisterForRemoteNotifications(NSError error)
 {
     MSPush.DidFailToRegisterForRemoteNotificationsWithError(error);
 }
Exemplo n.º 6
0
Arquivo: Push.cs Projeto: ManjuBP/.net
 /// <summary>
 /// Call this from the corresponding method override in your AppDelegate.
 /// </summary>
 /// <param name="deviceToken">Device token.</param>
 public static void RegisteredForRemoteNotifications(NSData deviceToken)
 {
     MSPush.DidRegisterForRemoteNotificationsWithDeviceToken(deviceToken);
 }
Exemplo n.º 7
0
Arquivo: Push.cs Projeto: ManjuBP/.net
 static Task PlatformSetEnabledAsync(bool enabled)
 {
     MSPush.SetEnabled(enabled);
     return(Task.FromResult(default(object)));
 }
Exemplo n.º 8
0
Arquivo: Push.cs Projeto: ManjuBP/.net
 static Task <bool> PlatformIsEnabledAsync()
 {
     return(Task.FromResult(MSPush.IsEnabled()));
 }