Notification can be build using Notification. Builder or NotificationCompat.Builder classes. But if you want backward compatibility you should use NotificationCompat.Builder class as it is part of v4 Support library as it takes care of heavy lifting for providing consistent look and functionalities of Notification for API 4 and above.
Notification are displayed by calling notify() method of NotificationManger class
The NotificationCompat.Builder is the most easy way to create Notifications on all Android versions.
Notification Example
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
.setSmallIcon(R.drawable.notification_icon)
.setContentTitle("Notificition")
.setContentText("Content Text")
.setStyle(new NotificationCompat.BigTextStyle()
.bigText("Description Text"))
.setPriority(NotificationCompat.PRIORITY_DEFAULT);
I started to learn android and Kotlin and iOS and Hybrid application and i cant code IOS very well. But i love more interesting to code and finding new developer minds who are join to me You're welcome to keep on using my website.Instead, you can join our FB page for developer comments and post there: https://www.facebook.com/ramasamy.m.779 Best wishes :) Ramasamy(Software Developer)
See what's new in Android & IOS & Hybrid development … explore and learn in site
Ramasamy
5 min agoKotlin and React native example too
ReplyRamasamy
5 min agoKotlin and React native example too
ReplyRamasamy
5 min agoKotlin and React native example too
Reply