Exemplo n.º 1
0
        /// <summary>
        /// Initializes the firebase plugin.
        /// </summary>
        /// <param name="options">Application launch options.</param>
        /// <param name="notifoStartup">The <see cref="INotifoStartup"/> implementation.</param>
        /// <param name="notificationHandler">The <see cref="INotificationHandler"/> implementation.</param>
        /// <param name="autoRegistration">Automatically register for push notifications.</param>
        public static void Initialize(NSDictionary options, INotifoStartup notifoStartup, INotificationHandler?notificationHandler = null, bool autoRegistration = true)
        {
            FirebasePushNotificationManager.Initialize(options, autoRegistration);

            NotifoIO.Current.SetNotificationHandler(notificationHandler);
            notifoStartup.ConfigureService(NotifoIO.Current);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes the firebase plugin.
        /// </summary>
        /// <param name="context">The current application context.</param>
        /// <param name="notifoStartup">The <see cref="INotifoStartup"/> implementation.</param>
        /// <param name="notificationHandler">The <see cref="INotificationHandler"/> implementation.</param>
        /// <param name="resetToken">Set to <see langword="true"/> while debugging.</param>
        /// <param name="autoRegistration">Automatically register for push notifications.</param>
        public static void Initialize(Context context, INotifoStartup notifoStartup, INotificationHandler?notificationHandler = null, bool resetToken = false, bool autoRegistration = true)
        {
            FirebasePushNotificationManager.Initialize(context, new NotifoPushNotificationHandler(), resetToken, createDefaultNotificationChannel: true, autoRegistration);

            NotifoIO.Current.SetNotificationHandler(notificationHandler);
            notifoStartup.ConfigureService(NotifoIO.Current);
        }