I am able to create notification so:
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (notificationManager != null) {
notificationManager.notify(NOTIFICATION_ID, notification);
}
and so:
NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(MainActivity.this);
notificationManagerCompat.notify(NOTIFICATION_ID, notification);
So, what differences between these ways?