-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flutter_local_notifications] added ability to specify silent notification through AndroidNotificationDetails #2102
Conversation
@@ -36,6 +36,7 @@ public class NotificationDetails implements Serializable { | |||
private static final String ONGOING = "ongoing"; | |||
private static final String STYLE = "style"; | |||
private static final String ICON = "icon"; | |||
private static final String SILENT = "silent"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: you might want to write this below ONGOING
to keep the order with the rest.
- Probably this is my fault.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
@@ -277,7 +277,8 @@ protected static Notification createNotification( | |||
.setContentIntent(pendingIntent) | |||
.setPriority(notificationDetails.priority) | |||
.setOngoing(BooleanUtils.getValue(notificationDetails.ongoing)) | |||
.setOnlyAlertOnce(BooleanUtils.getValue(notificationDetails.onlyAlertOnce)); | |||
.setOnlyAlertOnce(BooleanUtils.getValue(notificationDetails.onlyAlertOnce)) | |||
.setSilent(BooleanUtils.getValue(notificationDetails.silent)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: you might want to write this below ONGOING
to keep the order with the rest.
- Probably this is my fault.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not super familiar, so I might not be right. But, I don't think this file change is related to the feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree but I'm not entirely sure. Feel free to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not super familiar, so I might not be right. But, I don't think this file change is related to the feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree but I'm not entirely sure. Feel free to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not super familiar with the example code and buttons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test looks good to me :D
Thanks to TheFinestArtist for providing code for adding the silent option
Closes #2021