Android Notification - ythy/blog GitHub Wiki

the constructor for Notification which is deprecated as of API 11. Meaning it isn't supported any longer and should not be used. use Notification.Builder instead

bad:

Notification notification = new Notification(icon, message, when);

right: build require API 16

Notification notification = new Notification.Builder(context)
    .setContentText(message)
    .setSmallIcon(icon)
    .setWhen(when)
    .build();