Slight change to android notification

This commit is contained in:
Yousef Khadadeh 2026-05-18 09:09:26 +03:00
parent e8cba9dc15
commit 35d2a03406

View file

@ -44,7 +44,7 @@ public class InfiniPaintNetworkService extends Service {
@Override @Override
public int onStartCommand(Intent intent, int flags, int startId) { public int onStartCommand(Intent intent, int flags, int startId) {
Notification notification = new Notification.Builder(this, CHANNEL_ID) Notification notification = new Notification.Builder(this, CHANNEL_ID)
.setContentTitle("Currently online") .setContentTitle("Connected")
.setSmallIcon(R.drawable.logo_foreground_tiny) .setSmallIcon(R.drawable.logo_foreground_tiny)
.build(); .build();
startForeground(1, notification); startForeground(1, notification);
@ -68,7 +68,7 @@ public class InfiniPaintNetworkService extends Service {
NotificationChannel serviceChannel = new NotificationChannel( NotificationChannel serviceChannel = new NotificationChannel(
CHANNEL_ID, CHANNEL_ID,
"Network Service Channel", "Network Service Channel",
NotificationManager.IMPORTANCE_DEFAULT NotificationManager.IMPORTANCE_LOW
); );
NotificationManager manager = getSystemService(NotificationManager.class); NotificationManager manager = getSystemService(NotificationManager.class);
manager.createNotificationChannel(serviceChannel); manager.createNotificationChannel(serviceChannel);