Skip to content

Commit

Permalink
Notification config
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Jul 13, 2024
1 parent ee8c152 commit 444ca99
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ private Notification buildServiceNotification() {
.setContentTitle("Tor Notifications")
.setContentText("The app will run on the background to send you notifications about your orders.")
.setSmallIcon(R.mipmap.ic_icon)
.setTicker("Robosats");
.setTicker("Robosats")
.setPriority(NotificationCompat.PRIORITY_MIN)
.setOngoing(true)
.setAutoCancel(false);

return builder.build();
}
Expand Down Expand Up @@ -239,7 +242,7 @@ private void displayOrderNotification(Integer order_id, String message, String c
.setContentTitle("Order #" + order_id)
.setContentText(message)
.setSmallIcon(R.mipmap.ic_icon)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setContentIntent(pendingIntent)
.setAutoCancel(true);

Expand All @@ -255,7 +258,7 @@ private void displayErrorNotification() {
.setContentTitle("Connection Error")
.setContentText("There was an error while connecting to the Tor network.")
.setSmallIcon(R.mipmap.ic_icon)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setAutoCancel(true);

notificationManager.notify(0, builder.build());
Expand Down

0 comments on commit 444ca99

Please sign in to comment.