diff --git a/mobile-app/lib/service/podcast/notification_service.dart b/mobile-app/lib/service/podcast/notification_service.dart index 99d88e9c4..e7cb04bc1 100644 --- a/mobile-app/lib/service/podcast/notification_service.dart +++ b/mobile-app/lib/service/podcast/notification_service.dart @@ -1,4 +1,5 @@ import 'dart:developer' as dev; +import 'dart:io'; import 'dart:math'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; @@ -34,12 +35,14 @@ class NotificationService { iOS: iosInitializationSettings, ); - await _flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - AndroidFlutterLocalNotificationsPlugin>() - ?.requestNotificationsPermission(); - await _flutterLocalNotificationsPlugin.initialize(initializationSettings); + + if (Platform.isAndroid) { + await _flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + AndroidFlutterLocalNotificationsPlugin>() + ?.requestNotificationsPermission(); + } } Future showNotification(String title, String body) async {