Написал стандартный код отображения уведомлений в MainActivity, но оно не отображается и не выдает ошибку. Код в OnCreate:
Intent notificationIntent = new Intent(this, MainActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(this,
0, notificationIntent,
PendingIntent.FLAG_CANCEL_CURRENT);
Resources res = this.getResources();
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
Notification notification = builder.setContentIntent(contentIntent)
.setSmallIcon(R.drawable.walk)
.setContentTitle(res.getString(R.string.route_notif_title))
.setContentText(res.getString(R.string.route_notif_text))
.setWhen(System.currentTimeMillis())
.setAutoCancel(true)
.build();
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
notificationManager.notify(112, notification);