Java 3

From Teknologisk videncenter
Jump to: navigation, search

Notification Channel

public void CreateNotificationChannel() {
        NotificationChannel channel = new NotificationChannel(
                "test",
                "test",
                NotificationManager.IMPORTANCE_DEFAULT);

        notificationManager = getSystemService(NotificationManager.class);
        notificationManager.createNotificationChannel(channel);
    }