#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); }
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)); }
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); }
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 }
protected override void OnNewIntent(Intent intent) { base.OnNewIntent(intent); NotifoFirebasePlugin.ProcessIntent(this, intent); }
public void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler) => NotifoFirebasePlugin.DidReceiveNotificationResponse(center, response, completionHandler);
public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error) { NotifoFirebasePlugin.RemoteNotificationRegistrationFailed(error); }
public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken) { NotifoFirebasePlugin.DidRegisterRemoteNotifications(deviceToken); }