Example #1
0
#pragma warning disable RECS0165 // Asynchronous methods should return a Task instead of void
        public override async void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action <UIBackgroundFetchResult> completionHandler)
#pragma warning restore RECS0165 // Asynchronous methods should return a Task instead of void
        {
            await NotifoFirebasePlugin.DidReceiveMessageAsync(userInfo);

            completionHandler(UIBackgroundFetchResult.NewData);
        }
Example #2
0
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App(new iOSInitializer()));

            NotifoFirebasePlugin.Initialize(launchOptions, new NotifoStartup(), new NotificationHandler(), true);
            UNUserNotificationCenter.Current.Delegate = this;

            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Example #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App(new AndroidInitializer()));

            NotifoFirebasePlugin.ProcessIntent(this, Intent);
        }
Example #4
0
        public override void OnCreate()
        {
            base.OnCreate();

            if (Build.VERSION.SdkInt >= BuildVersionCodes.O)
            {
                FirebasePushNotificationManager.DefaultNotificationChannelId   = "FirebasePushNotificationChannel";
                FirebasePushNotificationManager.DefaultNotificationChannelName = "General";
            }

#if DEBUG
            NotifoFirebasePlugin.Initialize(this, new NotifoStartup(), new NotificationHandler(), resetToken: true);
#else
            NotifoFirebasePlugin.Initialize(this, new NotifoStartup(), new NotificationHandler(), resetToken: false);
#endif
        }
Example #5
0
 protected override void OnNewIntent(Intent intent)
 {
     base.OnNewIntent(intent);
     NotifoFirebasePlugin.ProcessIntent(this, intent);
 }
Example #6
0
 public void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler) =>
 NotifoFirebasePlugin.DidReceiveNotificationResponse(center, response, completionHandler);
Example #7
0
 public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
 {
     NotifoFirebasePlugin.RemoteNotificationRegistrationFailed(error);
 }
Example #8
0
 public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
 {
     NotifoFirebasePlugin.DidRegisterRemoteNotifications(deviceToken);
 }