예제 #1
0
        public override void Initialize(ForegroundNotificationOptions showForegroundNotificationsInSystemOptions)
        {
            if (_isInitialized)
            {
                throw new ArgumentException($"{nameof(DroidPushNotificationsService)}: Already Initialized");
            }

            _isInitialized = true;
            _showForegroundNotificationsInSystemOptions = showForegroundNotificationsInSystemOptions;

            NotificationsHelper.CreateNotificationChannels(_appContext);

            FirebaseApp.InitializeApp(_appContext);
            XFirebaseMessagingService.OnTokenRefreshed       += OnPushTokenRefreshed;
            XFirebaseMessagingService.OnNotificationReceived += OnNotificationReceived;
        }
예제 #2
0
 public override void OnReceive(Context context, Intent intent)
 {
     NotificationsHelper.CreateNotificationChannels(context);
 }