Java 3

From Teknologisk videncenter
Revision as of 14:03, 30 January 2019 by Mach (talk | contribs) (Created page with "==Notification Channel== <source lang="java> public void CreateNotificationChannel() { NotificationChannel channel = new NotificationChannel( "test",...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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);
    }