rafaelsetragni / awesome_notifications

A complete solution to create Local Notifications and Push Notifications, throught Firebase or another services, using Flutter.
https://discord.awesome-notifications.carda.me
Apache License 2.0
753 stars 325 forks source link

Double notification on android #971

Open m-hamza-tanbits opened 3 weeks ago

m-hamza-tanbits commented 3 weeks ago

I am using awesome notification While my app in foreground or background i have received two notification , One is Awesome notification and second is firebase default notification While on checking if i remove notification object from payload IOS will not receive notification. How we can handle this This is my code Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { if (message.data['type'] != null) { await AwesomeNotifications().createNotification( content: NotificationContent( id: DateTime.now().millisecondsSinceEpoch.remainder(100000), channelKey: 'isn', title: "${message.notification?.title}", body: "${message.notification?.body} ", category: NotificationCategory.Message, duration: const Duration(seconds: 5), autoDismissible: true, backgroundColor: ColorConstant.lightGreyColor, ), ); } } This is my OutPut On android side

image
mosfeqanik commented 2 days ago

i am also facing this .how to solve it ???? Screenshot_20240918_163421