Better sentence and interactive permanent notification

This commit is contained in:
koalasat 2024-07-14 18:57:27 +02:00
parent 005adc6521
commit be748d8981
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157

View File

@ -110,14 +110,19 @@ public class NotificationsService extends Service {
}
private Notification buildServiceNotification() {
Intent intent = new Intent(this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_IMMUTABLE);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
.setContentTitle("Tor Notifications")
.setContentText("The app will run in the background to send notifications about your orders.")
.setContentText("Running in the background to check every 5 minutes for notifications.")
.setSmallIcon(R.mipmap.ic_icon)
.setTicker("Robosats")
.setPriority(NotificationCompat.PRIORITY_MIN)
.setOngoing(true)
.setAutoCancel(false);
.setAutoCancel(false)
.setContentIntent(pendingIntent);
return builder.build();
}