Merge pull request #33 from ialokim/foreground-notification
Some changes to foreground notification (channel)
This commit is contained in:
@@ -36,6 +36,7 @@ public class NotificationSupport {
|
||||
Channel.FOREGROUND,
|
||||
"Gotify foreground notification",
|
||||
NotificationManager.IMPORTANCE_LOW);
|
||||
foreground.setShowBadge(false);
|
||||
|
||||
NotificationChannel messagesImportanceMin =
|
||||
new NotificationChannel(
|
||||
|
||||
@@ -168,6 +168,9 @@ public class WebSocketService extends Service {
|
||||
new NotificationCompat.Builder(this, NotificationSupport.Channel.FOREGROUND)
|
||||
.setSmallIcon(R.drawable.ic_gotify)
|
||||
.setOngoing(true)
|
||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||
.setShowWhen(false)
|
||||
.setWhen(0)
|
||||
.setContentTitle(getString(R.string.app_name))
|
||||
.setContentText(message)
|
||||
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
|
||||
|
||||
Reference in New Issue
Block a user