Android'e bildirim ekleyecek bir programa ihtiyacım var. Ve birisi bildirimi tıkladığında, bu onları ikinci faaliyetime yönlendirmelidir.
Kodu oluşturdum. Bildirim çalışıyor olmalı, ancak nedense çalışmıyor. Notification
Hiç gösterilmiyor. Ne kaçırdığımı bilmiyorum.
Bu dosyaların kodu:
Notification n = new Notification.Builder(this)
.setContentTitle("New mail from " + "test@gmail.com")
.setContentText("Subject")
.setContentIntent(pIntent).setAutoCancel(true)
.setStyle(new Notification.BigTextStyle().bigText(longText))
.build();
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
// Hide the notification after it's selected
notificationManager.notify(0, n);
Activity
başlatılmaktadır olmasın? MıNotification
gösterilmiyor?