Exemplo n.º 1
0
        protected override bool OnRecoverableError(Context context, string errorId)
        {
            AndroidPushService.SetRegisterRegistrationId(string.Empty);
            AndroidPushService.SetUnRegisterRegistrationId(string.Empty);

            return(false);
        }
Exemplo n.º 2
0
 protected override void OnMessage(Context context, Intent intent)
 {
     if (intent != null || intent.Extras != null)
     {
         var message = intent.Extras.GetString("msg");
         if (message != null)
         {
             mainThreadHandler.Post(() =>
             {
                 var baseActivity = CrossCurrentActivity.Current.Activity as BaseActivity;
                 if (baseActivity != null && baseActivity.IsActivityVisible)
                 {
                     AndroidPushService.ShowInAppToast(context, message);
                 }
                 else
                 {
                     AndroidPushService.ShowLocalPush(context, message);
                 }
             });
         }
     }
 }
Exemplo n.º 3
0
 protected override void OnError(Context context, string errorId)
 {
     AndroidPushService.SetRegisterRegistrationId(string.Empty);
     AndroidPushService.SetUnRegisterRegistrationId(string.Empty);
 }
Exemplo n.º 4
0
 protected override void OnUnRegistered(Context context, string registrationId)
 {
     AndroidPushService.SetUnRegisterRegistrationId(registrationId);
 }