Skip to content

Commit b986c6e

Browse files
committed
Notification config
1 parent ee8c152 commit b986c6e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mobile/android/app/src/main/java/com/robosats/NotificationsService.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ private Notification buildServiceNotification() {
114114
.setContentTitle("Tor Notifications")
115115
.setContentText("The app will run on the background to send you notifications about your orders.")
116116
.setSmallIcon(R.mipmap.ic_icon)
117-
.setTicker("Robosats");
117+
.setTicker("Robosats")
118+
.setPriority(NotificationCompat.PRIORITY_MIN)
119+
.setOngoing(true)
120+
.setAutoCancel(false);
118121

119122
return builder.build();
120123
}
@@ -239,7 +242,7 @@ private void displayOrderNotification(Integer order_id, String message, String c
239242
.setContentTitle("Order #" + order_id)
240243
.setContentText(message)
241244
.setSmallIcon(R.mipmap.ic_icon)
242-
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
245+
.setPriority(NotificationCompat.PRIORITY_HIGH)
243246
.setContentIntent(pendingIntent)
244247
.setAutoCancel(true);
245248

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

261264
notificationManager.notify(0, builder.build());

0 commit comments

Comments
 (0)