Notification config

This commit is contained in:
koalasat 2024-07-13 14:47:08 +02:00
parent ee8c152055
commit 444ca995c0
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157

View File

@ -114,7 +114,10 @@ public class NotificationsService extends Service {
.setContentTitle("Tor Notifications") .setContentTitle("Tor Notifications")
.setContentText("The app will run on the background to send you notifications about your orders.") .setContentText("The app will run on the background to send you notifications about your orders.")
.setSmallIcon(R.mipmap.ic_icon) .setSmallIcon(R.mipmap.ic_icon)
.setTicker("Robosats"); .setTicker("Robosats")
.setPriority(NotificationCompat.PRIORITY_MIN)
.setOngoing(true)
.setAutoCancel(false);
return builder.build(); return builder.build();
} }
@ -239,7 +242,7 @@ public class NotificationsService extends Service {
.setContentTitle("Order #" + order_id) .setContentTitle("Order #" + order_id)
.setContentText(message) .setContentText(message)
.setSmallIcon(R.mipmap.ic_icon) .setSmallIcon(R.mipmap.ic_icon)
.setPriority(NotificationCompat.PRIORITY_DEFAULT) .setPriority(NotificationCompat.PRIORITY_HIGH)
.setContentIntent(pendingIntent) .setContentIntent(pendingIntent)
.setAutoCancel(true); .setAutoCancel(true);
@ -255,7 +258,7 @@ public class NotificationsService extends Service {
.setContentTitle("Connection Error") .setContentTitle("Connection Error")
.setContentText("There was an error while connecting to the Tor network.") .setContentText("There was an error while connecting to the Tor network.")
.setSmallIcon(R.mipmap.ic_icon) .setSmallIcon(R.mipmap.ic_icon)
.setPriority(NotificationCompat.PRIORITY_DEFAULT) .setPriority(NotificationCompat.PRIORITY_HIGH)
.setAutoCancel(true); .setAutoCancel(true);
notificationManager.notify(0, builder.build()); notificationManager.notify(0, builder.build());