The plugin should provide the ability to specify custom notification actions. However, this will depends on the Flutter engine being able to support headless-Dart code as per https://github.com/flutter/flutter/issues/6192 and https://github.com/flutter/flutter/issues/3671
It appears Android support is there but will wait to see on if the engine can support it for iOS applications, and for Flutter to provide abstractions to access the functionality. Without the support being added in, then this won't work for scenarios like when the application has been terminated as the logic associated with the action would've been defined in Dart.
Edit: there is headless execution on iOS but there are limitations at the moment. See https://github.com/flutter/flutter/issues/23904. Upvote the issue on the Flutter repo if this concerns you to help the Flutter team prioritise
Hi @MaikuB do you have an example use case where of using a custom notification action on iOS?
@mit-mit
I believe the support for this would be covered in https://github.com/flutter/flutter/issues/3671 and help enable more fully featured apps. That thread covers other use cases that would require headless-Dart execution.
It'd also be good if the team could provide more documentation on how headless execution works on Android. I tried to look at how to do this to implement custom actions on Android and to handle another request (#21) by mimicking the changes I saw in https://github.com/flutter/plugins/tree/master/packages/android_alarm_manager but wasn't successful. Haven't checked in that code can do so to another branch if your team has capacity to provide input
@MaikuB
I worked a bit on my own notification plugin and while it's not fully featured as yours, I did get custom actions working with headless Dart in Android (at least from my testing of using my app daily for the past month, it seems to be working).
You need to create an Android service, that will host your shared method channel and support handling the intent in the background. Make sure to set up the shared channel when the plugin is registered. Then when you are creating your notification, if it is meant to run in the background, the intent must be created with your Service class. Then in your Service's onHandleIntent, you want to get the shared channel and invoke your callback to dart. And then here's where I handle the call from the Android service in Dart.
Hopefully that helps. Great plugin by the way. Your plugin has more features and you seem to be more active in development than I am, so I think I'll add a reference to your plugin in my readme, in case people want the features your plugin offers.
@mitchhymel thanks for the tips and appreciation :)
However, does that cover when the application has been terminated as well? That's the main scenario i'm looking at it that I have concerns about? If you look at what's in the android_alarm_manager plugin, you can see what they try to do is resolve an instance of the Flutter application etc to find the callback to invoke. That's what I believe to be crucial in handling that scenario and haven't seen in your code. I already handle intents via the plugin as it implements the NewIntentListener
I'm not sure if it handles when the application has been terminated. I haven't tested it yet with my code. From your description, and looking at the AlarmService code, I'm thinking my code would not handle the case where the app is terminated. So maybe my code is not a helpful example.
Fair enough. i've managed to at least handle it so that when app is terminated when comes to tapping the notification and then triggering a callback after launch. Anyway, appreciate you trying to provide help :)
@mit-mit i've figured out what i was missing on the Android side of things now but be good to see if the team is able to find a solution for iOS :)
@mit-mit i mentioned this on the main Flutter repo but don't know if anyone from your team has seen it given there hasn't been a response. I've taken a look at how Dart code is executed from Android and from what I can gather, it doesn't seem like the APIs that have been exposed allow for passing back arguments from the Andoid side back to the Dart function that will be invoked. This prevents being able to implement a lot of use cases e.g. knowing which alarm to snooze once the callback has been received on the Dart side
@MaikuB let me ask around a bit, but may take a while as the whole team is really busy getting ready for I/O next week.
Awesome, i understand so thanks for that. Looking forward to see what's on next week :)
@mit-mit since I/O is done now, just wanted to see if were you able to find more information about this. Also. I know Hixie said iOS headless execution is being looked into but whilst doing that, it'd be good if the team looks at if it's possible to do that and pass payload back from the iOS side as well
Doesn't the firebase messaging plugin handle this? I am pretty sure it does processing without pulling the app to the foreground...
Nope, take a look at the README file for it on how it handles when the app is terminated and you'll see this
Notification is delivered to system tray. When the user clicks on it to open app onLaunch fires if click_action: FLUTTER_NOTIFICATION_CLICK is set (see below).
How I handle when the user taps on the notification at the moment is pretty much identical except it's consolidated to a single event handler
I followed the idea above from @mitchhymel and it seems to work. It is opening up the app and calling the method on it to say the button was clicked on. How do you verify this scenario? I am swiping the app away in the activity list. I suspect this will make the startup tricky though since the ordering will likely be an issue when the activity starts. Since Mitch is using getActivitry on the pending intent it is opening up the app. Got it working correctly on ios too with categories.
It won't do background processing in this case though by the looks :) Which is likely what you are worried about? It will only work if it forces the app into the foreground and does something. Which is a bit disappointing.
What you're doing is actually not that much different to how I handle when the app is terminated and the user taps on the notification, i.e. launch the app and trigger the callback that allows apps to handle the action that occurred.
Yes, I'm concerned with running code in the background even when the app is terminated and as @mitchhymel mentioned, I don't believe his code handled that either. This would help enable scenarios like being able to snooze an alarm and skipping music tracks when the app has been terminated. The mechanisms to achieve this are different (one of which is to have the intent trigger a service) and appear to also handled the case when the app is currently running. However, as I mentioned earlier, the APIs that are available don't allow passing parameters back. I'd much prefer to only add shipping this feature when it's possible to handle all the scenarios (i.e. when is terminated or running). Otherwise, I'd end up with code that needs to be changed later or devs seeing issues raised even when a limitation has been documentation but they didn't bother reading about it, which i'm also guilty of :)
Anyway, hope you understand where I'm coming from
I can see that. I just did a slightly different change that lets you open
a url on an action instead. This lets you do things like driving
directions from the buttons too. All of this sorts out what I need to do
with buttons... Although the fact that firebase messages get dropped on
the floor in the background is a bit of a bastard :)
On 21 May 2018 at 17:58, Michael Bui notifications@github.com wrote:
What you're doing is actually not that much different to how I handle when
the app is terminated and the user taps on the notification, i.e. launch
the app and trigger the callback that allows apps to handle the action that
occurred.Yes, I'm concerned with running code in the background even when the app
is terminated. This would help enable scenarios like being able to snooze
an alarm and skipping music tracks when the app has been terminated. The
mechanisms to achieve this are different (one of which is to have the
intent trigger a service) and appear to also handled the case when the app
is currently running. However, as I mentioned earlier, the APIs that are
available don't allow passing parameters back. I'd much prefer to only add
shipping this feature when it's possible to handle all the scenarios (i.e.
when is terminated or running). Otherwise, I'd end up with code that needs
to be changed later or devs seeing issues raised even when a limitation has
been documentation but they didn't bother reading about it, which i'm also
guilty of :)Anyway, hope you understand where I'm coming from
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MaikuB/flutter_local_notifications/issues/17#issuecomment-390829519,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACbmMQYZU2dHCAV1s2t3D-CC52XH4Ldlks5t02KagaJpZM4TeOyk
.
Great example @MaikuB -a social media app may notify users when someone has replied their post, in which case actions may be presented to allow the user to either reply or like the reply
Looking forward to be able to do something like a direct reply/voice recording as well
@pinkfish too right mate :)
Any Update on this? There are quite a lot of use-cases that require custom actions!
I'm well aware of that. You should follow the issues linked in the original post. There are open PRs related to this that need to go in first to enable this to work better, particularly when the app isn't running. If it's that urgent and you don't care about scenarios like that (via headless Dart execution) then I'd suggest you fork to roll a custom build.
Edit: I can see you've already commented on one of the PRs
Hi, with this issue now resolved: https://github.com/flutter/flutter/issues/3671, does that unblock the work for this issue? If so, what are you currently thinking for ETA?
This functionality is critical for a project I'm currently working on, I appreciate your work on this!
It does unblock from looking at it but it's not rolled over to beta channel and that's where a lot of devs will likely to be on. So if it were done it would be a blocker for release until the changes rolled into beta. Last i checked dev was on 0.5.8 (I believe the changes have rolled into there) and there are reports of hot reloading or restarting being broken (think I ran into an issue too) and devs rolling back to the previous dev build (0.5.7) so there are concerns around stability there. From what I read the reason why beta hasn't been updated for a long time is so the Flutter team can do more rigorous testing as well.
I'm in the midst of the working on an app (along with some other work) so hard to give an ETA at the moment though I'll likely get to test the headless execution in the next few days e.g. see if #21 would work on the Dev channel.
If you or someone from the community would be able to assist then that would be great. @pinkfish submitted a PR a while back but that was before headless execution work was done and would be a good starting point
Thanks for the update! I'm curious what you learn from working on #21 (I'll subscribe to that issue as well)
I'm not able to assist at the moment, but I could possibly help in a few weeks. If you or someone else is able to get started in the meanwhile, that would help give this momentum! I'm happy to join in as soon as I can.
Is this even possible on iOS? I didn't think you got any callbacks on notifications there.
Are you referring to #21 around a callback when a notification is to be shown?
Right, yes. Doing a callback on a scheduled notification. Can you run code then? You cannot on remote notifications right?
There is at least this callback, which isn't specific to a scheduled notification when the app is in the foreground
I should clarify that I wasn't looking at #21 specifically to scheduled notifications but for (local) notifications in general. Headless Dart execution on iOS via the callback I linked isn't necessary but would help to see if it will still works
Any update on this issue? I'd like to use this plugin for an app but the quick actions are essential. I saw a reference to it already being possible on Android, which is the platform I am primarily developing for.
@davystrong none at the moment. I previously tried to add headless execution of Dart code (this is relevant so code can be run even if the app is terminated) but ran into some issues that appeared to be related to isolates. I had raised an issue in this on the Flutter repo and believe they were going to look at how to make this easier for plugin developers. Am not sure what the status is on this
@MaikuB I just finished a FCM push plugin that works with a terminated app. With the good headless initialization code it's actually quite easy.
I did the work only for Android since I am clueless regarding iOS. My understanding is that it should not be that difficult, and probably simpler than the Android part.
I am planning to work on this item now since I am missing quite a bit the actions now that I have push for a messaging app :)
i suspect you'll run into issues as headless execution relies on running on a background isolate but we also want actions to be able to run code on the main isolate so that it can update the UI when the app is running. I ran into similar problems (on Android) whilst looking at the geofencing sample and have already reported an issue on the main Flutter repo around this
For now I don't need to live update the UI to be frank so I am happy with their isolate impl. It allows me to read the DB of my app, fetch some messages from the server and display them in the notif.
But I am interested in the problem, of the UI update, can you link me the bug ?
Thanks !
If you're not concerned with that then I'd suggest that you implement it in your own fork. I'd prefer the UI issue gets solved as well to avoid the scenario where the headless implementation may need to be rewritten when the issue gets resolved. The issue I'm referring to is https://github.com/flutter/flutter/issues/23904
@MatMaul Are you planning to implement this? I believe this would also solve my problem.
This plugin is very supportable in all type of local nofifications but please introduce one more thing where we can pass widget also to notification bar . Where we can show our customized look on nofication area
@vikramaggarwal13 Based on what I know, I don't think that is achievable. Doing custom layouts for notifications on each platform, requires using the way UI is done on that platform e.g. layout files for Android https://developer.android.com/training/notify-user/custom-notification
hmm Okay , But is there any way i want to introduce pause play button on notification area . I want user to play or pause music directly from notification area.
not at this stage, the reasons why have been discussed above already
Ok Alright
To clarify i'm referring to via this plugin. an alternative that you look at writing code that uses platform channels yourself. This may likely require you to invoke the media playback functionality on the Android/iOS side as well
Any updates? Not experienced with Android but looked into the code and wonder if it would be possible to do similar to https://github.com/transistorsoft/flutter_background_fetch (which can call Flutter when the application is terminated) and change the HeadlessBroadcastReceiver to listen to respond to notification actions instead?
I made it work by changing android_alarm_manager (fork: https://github.com/flutter/plugins/pull/2013) and sending pending intents to its broadcast receiver. This then worked when the app was terminated as well. To create actions, I changed the notification details to contain the text for the action button, method to be invoked and the args as a json string.
Intent actionIntent1 = new Intent(NOTIFICATION_ACTION);
actionIntent1.putExtra("notificationId", notificationDetails.id);
actionIntent1.putExtra("method", notificationDetails.firstActionMethod);
actionIntent1.putExtra("arguments", notificationDetails.firstActionArgs);
PendingIntent actionPendingIntent1 =
PendingIntent.getBroadcast(context.getApplicationContext(), notificationDetails.id + 1, actionIntent1, PendingIntent.FLAG_UPDATE_CURRENT);
builder.addAction(0, notificationDetails.firstActionText, actionPendingIntent1);
@MaikuB I read multiple times about "termination". What does this actually mean? Are we talking about "swiping up" from recent apps? Or are we talking about stopping the app from the app-info page in settings?
Also, maybe you can update the OP, as I think you'll get the question: "any update on this" many more times.
@robindijkhof: it means when the app isn't running or has been killed/shutdown through whatever means (e.g. swiping up depending on the OS).
Regarding updating the OP, there's actually a blocked label on this issue already. I can update it but not sure if it'll help much at the end. Thanks for the suggestion though.
@martinory Any chance you could make a PR to add this feature here?
@dereklakin my understanding of what @martinory has done is dependent on the android alarm manager plugin (would need more details on why there's a dependency on that) so likely only works in specific scenarios. There are other scenarios this should handle where I found it's failing (see previous replies) hence why this is still blocked (note: there are labels on this issue)
@MaikuB I did use android_alarm_manager due to that they've already had figured out headless execution of dart code when the app is terminated and that it's well maintained. I did modify the package so it's not the official version of the plugin. In the plugin (android_alarm_manager), there is a todo in the java code that says that they might change the plugin to something similar to the changes I made but I don't know. I did do this just to investigate how it could be solved, there are probably many other ways to do it. Have no idea with iOS because I'm not into that.
I would have a function in my own code similar to:
_channel.setMethodCallHandler((call) {
final String method = call.method;
final String args = call.arguments[0];
switch (method) {
case "background":
background();
break;
case "triggerAction":
triggerAction(args);
break;
default:
print('[backgroundCallbackDispatcher] Didn\'t invoke any method ($method)');
break;
}
});
And then in the notification details (i also created a copyWith function):
notificationDetails.android.copyWith(
firstActionText: 'TEXT FOR AN ACTION',
firstActionMethod: 'triggerAction',
firstActionArgs: actionPayload.serialize(),
If anybody's interested, we implemented support for notification actions in a fork (pull request: https://github.com/MaikuB/flutter_local_notifications/pull/338). As @MaikuB wrote, it's not straightforward due to complexity of headless execution, so it's one of multiple possible approaches.
Thanks for the PR @noinskit. Haven't had a chance to to take a look the PR yet but, I suspect it would still have the same problem with isolates that I reported before as the issue is still open
@MaikuB I've seen that issue, but I think I'm not hitting it because I'm not using the same platform channel across more than one isolate (or maybe I misunderstood that issue's details).
Fair enough. i've managed to at least handle it so that when app is terminated when comes to tapping the notification and then triggering a callback after launch. Anyway, appreciate you trying to provide help :)
how did you do that ?
Hello,
flutter_background_fecth should do the trick AFAIU. Check this.
Maybe a side note, some time ago I've implemented an Android Home Screen Widget with actions that works when flutter app is terminated.
The way I've achieved that is with dart isolates and shared_preferences. When app is starting it sets a shared preference value with dart isolate callback ID. Then when user taps on the Home Screen Widget, intent is emitted and handled on the native side. Intent handler reads isolate callback ID from shared preferences and launches the isolate, adding parameters to detect what action actually was fired from widget.
Then on the Flutter/Dart side, in the isolate handler I'm initializing get_it, recognize user action and execute rest off actions handlers.
This should also work for notification actions. If I find some time I'll crate a PR with POC, but if anyone else would like to try I'm happy to help.
Hope this helps.
@dluksza you're right, this is what https://github.com/MaikuB/flutter_local_notifications/pull/338 is doing as well.
@noinskit that's a pity that #338 was closed. I see the limitations. In my case I use firebase and am able to update data from isolate, then _snapshots_ callback is called on the main app. But can imagine that this won't work for everyone.
One can still use SendPort to communicate between isolate and main thread, but this complicate things :|
I do like that you also implemented iOS part (can't say if it works) ;).
The issue I saw that is logged with the Flutter team (see original post) is that background execution could completely stop working. If you have some way to have it work in the background and main isolate whilst the app is running without such issues then I'd be happy to look at a pull request for it
Well, I would start small. Just provide a way to execute dart code in response to notification action, explicitly document that it runs in separate isolate and can't modify UI unless some kind of external pub-sub service is used (like firestore).
I'm guessing 95% of time main app will not run when notification occurs. Also one can modify local data and start application from isolate using intents.
Having something that can add actions and react to them on dart side is already a huge step forward. It can be later improved, but it is better start with something that works for 70% of use cases, then not have this feature at all.
Yeah, that PR I referred to has limitations and is essentially the "start small" approach. Instead of Firestore is uses shared_preferences (for data) and SendPort (for immediate notifications, if the main part is running).
Please add buttons to notifications, im using your plugin in my app and i need it.
@MaikuB it seems the OneSignal flutter package allows for action buttons and (at least in terms of my very brief test of swiping from recents) it will show notification even if the app is terminated. Do you know of any reason flutter_local_notifications couldn't do the same? I am sure it is not that simple but I am wondering what OneSignal might have done to figure it out???
@bagintz OneSignal is for push notifications not local notifications so it's valid comparison due to different use cases and it works differently as well. From what I've seen, the only thing the buttons will do is launch the app. There was a feature request to allow for running code in the background that I don't believe has been implemented
@MaikuB a feature request in the OneSignal package or flutter_local_notifications? The buttons only do launch the app but they pass in different values providing for a psuedo multiple action scenario (which is what I need, but I understand that is only one use case). I was more posting the observation about OneSignal in reply to your Feb 19th post:
The issue I saw that is logged with the Flutter team (see original post) is that background execution could completely stop working. If you have some way to have it work in the background and main isolate whilst the app is running without such issues then I'd be happy to look at a pull request for it
It would seem that the OneSignal team found some way around that (?)
a feature request in the OneSignal package or flutter_local_notifications?
OneSignal
It would seem that the OneSignal team found some way around that
I haven't seen anything to indicate that and I'm not sure what you are basing that on
@MaikuB Great, I will look for that on the OneSignal repo.
As for the other I guess maybe I am not sure what the definition of "terminated" is for background execution. With the Flutter package for OneSignal I can get notifications with multiple action buttons if the app is swiped away, terminated from ADB and upon reboot (with the app not in recents). Would these cases qualify as "background execution could completely stop working" or is something else I am not thinking of. I am late to this conversation so I realize I may be missing something. Thanks!!
@bagintz yes but buttons should work to invoke code regardless of which state the app is in.
A reminder that an issue has been raised with the Flutter team where they have acknowledged there's are issues/limitations. So if you're doing any digging then I don't think there's much point until there's a solution that the Flutter team can come up with.
If you have need for things like custom action buttons, upvote on the issue linked in the last paragraph of my original post as it doesn't have many votes compared the reactions I see on this issue about adding notification buttons
local_notifications SDK provides to add actions to the notification. Can't it be done on flutter_local_notifications? Custom notification actions are widely used in mobile apps.
https://pub.dev/documentation/local_notifications/latest/
local_notifications SDK provides to add actions to the notification. Can't it be done on flutter_local_notifications? Custom notification actions are widely used in mobile apps.
https://pub.dev/documentation/local_notifications/latest/
it is only work if the app not TERMINITED.
Now it's possible to launch app by clicking on notification. Maybe it would be possible to do same for actions? But when opening with action, it will provide some payload to main app?
It won't allow to handle actions in background, without launching app. However for a lot of cases it will be acceptable.
As I understood from this issue, it's probably easier to implement.
Is it possible to add actions to notification now in the middle of 2020?
Been waiting for this for 2 months
This feature was requested 2 yrs ago. Any updates would help us organise better
disappointing -_-
@shashikantdurge it wasn't a request that was put in, I put this in myself to track it. There are no more updates as the status is still the same where I mention in the original post to upvote on the related issue on the Flutter repo that blocks this
@shashikantdurge it wasn't a request that was put in, I put this in myself to track it. There are no more updates as the status is still the same where I mention in the original post to upvote on the related issue on the Flutter repo that blocks this
Is there absolutely ANYTHING we can do other than upvote the issue on the official repo?
just guide me. Any number to complain or any person to speak to? This has to be done man, its not good if we're ignored for 2 years.
@AbdulMalikDev You could look at resolving the limitation in the Flutter engine yourself if you can.
Other thing is you could also looking at writing the code to handle this yourself on the native side. Plugins don't always solve for all cases, in which case developers need to look at writing their own code. For example https://github.com/edsnider/localnotificationsplugin and https://github.com/thudugala/Plugin.LocalNotification are two Xamarin plugins that don't have support for actions.
Similarly, custom notification layouts aren't supported either as those need layouts to be built the standard iOS and Android way
Could you quote me for the work to add this feature @MaikuB if it's possible?
We sponsored the creation of https://github.com/cloudwebrtc/dart-sip-ua and I'd like action buttons for our app so a user and Accept or Reject an incoming call. And also for messaging for use with https://github.com/vukoye/xmpp_dart
It's best it's added here and open source.
Thanks ([email protected])
We're also users of your appauth plugin @MaikuB so it would be good to contribute back to you for that great project.
Thanks!
@ghenry based on what you've written, sounds like perhaps you haven't been following this issue properly. There are limitations with handling actions using just Dart code when the app isn't running. For your purposes you should look to either (1) fork as the starting point and add in the necessary code on the native side or (2) write the code to handle notifications from scratch
Edit: appreciate the sentiment in trying contribute back as not many try to do so
@MaikuB Understood, but based on what you've just written can 1) be abstracted and handled by this plugin on the native side like you are doing?
@ghenry you could have the notification shown via Dart using a plugin/platform channel but have Java/kotlin code that processes the actions specifically for your application's purpose
@ghenry you could have the notification shown via Dart using a plugin/platform channel but have Java/kotlin code that processes the actions specifically for your application's purpose
Probably the only way :(
https://pub.dev/packages/background_fetch found this package. Would this be helpful to run dart in the background for this use case?
@AbdulMalikDev Yes, background_fetch good working with flutter_local_notification.
@MaikuB Any updates on this?
Any updates?
Maybe we just need a wiki example of how to roll your own? There's some code here for Android:
https://medium.com/@info_67212/firebase-push-notification-with-action-button-in-flutter-a841da348097
and how to get the intents:
https://muetsch.io/how-to-receive-sharing-intents-in-flutter.html
https://flutter.dev/docs/get-started/flutter-for/android-devs#how-do-i-handle-incoming-intents-from-external-applications-in-flutter
The problem is, as @MaikuB explained further up is all this is done in the Android code. Not sure about iOS.
Or am I way off? I have offered to sponsored some type of abstraction - https://github.com/MaikuB/flutter_local_notifications/issues/17#issuecomment-660651376
@itssidhere @MaikuB I already mentioned the issue that this is blocked by that you can subscribe to and upvote. If there aren't updates there then you're not going to see updates here.
@ghenry if you need to roll your own then it's a matter of reading the docs for each platform's notification APIs
Any update on this topic? I need to implement a call notification with action button too.
Here's an example on native Android side
That's not suit the desire requirements.
I only need a notification with action button (decline call or accept call) and time to keep the notification display on top of phone
I don't need an extra features just only these two buttons and when I click on the actions button it will perform any action only my app and hide the notifications that's it.
Read the code example I pasted then :-)
I just went through it but I still have difficulty on link action between native code and dart code.
By the way did anyone has done implement custom action on this code https://github.com/doneservices/flutter_callkeep/wiki/Native-android-code-that-handles-incoming-calls
with Agora?
please share
Just to make sure, this includes buttons like in the alarm clock app (without opening the message content)?

Just to make sure, this includes buttons like in the alarm clock app (without opening the message content)?
Could you share more details please.
Any update?
Just to make sure, this includes buttons like in the alarm clock app (without opening the message content)?
Could you share more details please.
The notification will pop up with two buttons, one to snooze and one for dismiss.
Ringtone will play in the background in the meantime, and it will stop only when pressing the dismiss button.
Currently turning up the volume or pull from the top to see all notification stops the notification/ringtone sound.
Additionally I need the buttons to signal my app so that it will do staff in the background for each action that was pressed.
I am creating open source smart home and I want to link between people alarm clock to actions to execute in there home.
In case the user pressed the snooze button it will not start any action and will "ask" him again later.
Just to make sure, this includes buttons like in the alarm clock app (without opening the message content)?
Could you share more details please.
The notification will pop up with two buttons, one to snooze and one for dismiss.
Ringtone will play in the background in the meantime, and it will stop only when pressing the dismiss button.
Currently turning up the volume or pull from the top to see all notification stops the notification/ringtone sound.
Additionally I need the buttons to signal my app so that it will do staff in the background for each action that was pressed.
I am creating open source smart home and I want to link between people alarm clock to actions to execute in there home.
In case the user pressed the snooze button it will not start any action and will "ask" him again later.
Can you share notification code example? How did you add the buttons?
@hanyska it is still not the functionality in my app, this is the functionality that I am trying to understand if the issue will add support for (at list part of it).
The screen shot is example of the same behavior that currently can be found in google alarm clock.
@hanyska it is still not the functionality in my app, this is the functionality that I am trying to understand if the issue will add support for (at list part of it).
The screen shot is example of the same behavior that currently can be found in google alarm clock.
Use awesome_notifications package in flutter. It has better notification capabilities and it is providing action buttons also.
@AbdulMalikDev What are the benefit and disadvantages of it compared to this library ?
@AbdulMalikDev What are the benefit and disadvantages of it compared to this library ?
Please check on pub.dev it has a lot of customisation possibilities
Most helpful comment
Is it possible to add actions to notification now in the middle of 2020?