Design + Code an Android App from Scratch
This video shows you how to display notifications in Android with the help of the Pug notifications library. In the first step, we add the launcher icons inside the mipmap folder according to screen density. Instead of Notification.Builder or NotificationCompat.Builder classes, we use a third party library called Pug notification. Add the dependency for pug notification inside the build.grade file. Use the PugNotification.with static method that accepts a Context, a title method to specify the title of the notification, a message method to set the content displayed inside the notification, a bigTextStyle method to display extra content on those devices capable of displaying large notifications, a smallIcon and largeIcon method to set icons for the notification and a build method that finally constructs the notification. Don’t forget to use the click method in order to start an Activity when the notification is clicked.