# \[Android\] Notifications Overview and Pitfalls

DevFeed: [\[Android\] Notifications Overview and Pitfalls](<https://devfeed.tech/articles/android-notifications-overview-and-pitfalls-38603.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2017_02_11_android_notifications_overview_and_pitfalls/>)

Published: 2017-02-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [notifications](<https://devfeed.tech/topics/notifications.md>), [API](<https://devfeed.tech/topics/api.md>), [Library](<https://devfeed.tech/topics/library.md>), [interface](<https://devfeed.tech/topics/interface.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [article](<https://devfeed.tech/tags/article.md>), [interface](<https://devfeed.tech/tags/interface.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [library](<https://devfeed.tech/tags/library.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [notifications](<https://devfeed.tech/tags/notifications.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>)

## AI overview

An overview of Android notifications covering how to create, send, update, and handle clicks on notifications. It explains required notification fields, compatibility APIs, unique notification IDs, and PendingIntent identity, request codes, flags, and lifecycle.

## Source excerpt

Introduction Notifications are widely used in Android applications. Though API is pretty straightforward, there are some key things that one should know and understand. This article will try to be first step into understanding Notifications API. Sending Single Notification Notification singleNotification = new NotificationCompat.Builder(this) .setContentTitle("Title") .setContentText("Text") .setSmallIcon(R.drawable.ic_notification) .build(); NotificationManagerCompat notificationManager = NotificationManagerCompat.*from*(context); notificationManager.notify(notificationId, singleNotification); Key things here: We use NotificationCompat.Builder to have single interface for creating notifications and let Support Library do all compatibility tricks;