awesome_notifications icon indicating copy to clipboard operation
awesome_notifications copied to clipboard

Button click not working when app is closed.

Open yadav-aniket opened this issue 2 years ago • 2 comments

AwesomeNotifications().createNotification( content: NotificationContent( id: Random().nextInt(1000), channelKey: "basic_notification", title: notification['title'], body: notification['body'], payload:payload, displayOnBackground: true, displayOnForeground: true, notificationLayout: NotificationLayout.BigPicture, wakeUpScreen: true, fullScreenIntent: true, icon: "resource://drawable/logo", largeIcon: notification['image'], hideLargeIconOnExpand: true, bigPicture: notification['image'], ), actionButtons: [ NotificationActionButton( key: "LaunchURL", label: "Launch URL", enabled: true, color: const Color(0xff107189), buttonType: ActionButtonType.KeepOnTop, ); ],

AwesomeNotifications().actionStream.listen((event) { if (event.buttonKeyPressed == NotificationCTA.UrlLaunch.name) { urlLauncher(button['data']); } });

When app is open or in background it is working. But when app is closed after clicking on button, notification gets dismiss and nothing happens

awesome_notifications: ^0.6.21

Flutter doctor -v

[√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.22000.795], locale en-IN) • Flutter version 3.0.5 at D:\flutterSDK\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f1875d570e (4 weeks ago), 2022-07-13 11:24:16 -0700 • Engine revision e85ea0e79c • Dart version 2.17.6 • DevTools version 2.12.2

Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at C:\Users\HP\AppData\Local\Android\sdk • Platform android-33, build-tools 31.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) • All Android licenses accepted.

yadav-aniket avatar Aug 10 '22 08:08 yadav-aniket

To execute action buttons with app in background you need to use awesome notifications version greater or equal to 0.7.0

rafaelsetragni avatar Aug 11 '22 17:08 rafaelsetragni

i updated to the newest beta version, but app still not starting after click action button, it works only if you click whole notification :)) it even not working when app is in background

Miedziaq avatar Aug 23 '22 13:08 Miedziaq

Hi! Sorry for taking so long to respond to your issue on GitHub. I was focused on releasing the new 0.7.0 version of awesome_notifications and awesome_notifications_fcm and i didn't had time enough to do both. But now I can answer all your questions.

So now i'm asking you to recreate this topic using the new issue template. There's a lot of missing informations that i need to understand your problem, and all the instructions are already in the new issue template. Also, remember to check beforehand if your issue was posted by another user.

So I will automatically close all previous issues so far. Sorry for the inconvenience and i will be waiting for your new issue request.

Thank you so much for your support!

rafaelsetragni avatar Sep 29 '22 19:09 rafaelsetragni