Notification wird nicht angezeigt bei Samsung?!

  • Antworten:3
  • Bentwortet
HonorTheHaze
  • Forum-Beiträge: 5

23.07.2018, 17:14:30 via Website

Hey Community,
ich bin neue hier und habe mal eine Frage...
Bin gerade dabei eine Android App zu programmieren.
Nun will ich eine Notification anzeigen.

Alles schon und gut, beim Emulator (Bluestacks) funktioniert es, bei einem alten LG Handy (weiß nicht genau welches es ist) funktioniert es auch.
Nun aber wenn ich die App auf meinem Samsung Galaxy s7 edge oder Galaxy s8 funktioniert es nicht, dasheißt meine Notification wird nicht angezeigt?!

Meine Frage ist nun ob einer von euch auch das Problem hatte und wenn ja wie man dieses lösen kann.

Mein Code:

NotificationCompat.Builder noBuilder = (NotificationCompat.Builder) new NotificationCompat.Builder(this, "default")
.setDefaults(NotificationCompat.DEFAULT_ALL)
.setSmallIcon(R.drawable.ic_menu_send)
.setContentTitle("Test")
.setContentText("Hallo Welt!")
.setPriority(Notification.PRIORITY_MAX);

                NotificationManager notificationManager = (NotificationManager) activity.getSystemService(Context.NOTIFICATION_SERVICE);
                notificationManager.notify(1, noBuilder.build());

Vielen Dank im Voraus,

~ HonorTheHaze

Kommentieren
HonorTheHaze
  • Forum-Beiträge: 5

23.07.2018, 20:27:13 via Website

Danke dir!

Es halt mein Problem gelöst!

~HonorTheHaze

Hilfreich?
Kommentieren
Jokel
  • Forum-Beiträge: 1.530

23.07.2018, 20:29:14 via Website

Schön ;)

Hilfreich?
Kommentieren