Android Notification tutorial for beginners

Android Notification tutorial for beginners


Notifications are messages displayed in status bar. This is simple example of android notification using android studio.Adding icon, title and details of notification.

Android Notification tutorial for beginners

In this video tutorial, we will learn for Android Notifications.

Step 1: Create an android project

  • Create a new project named "Notifications"

Step 2: Update an activity XML

  • Create a button for Notify

Step 3: Update main activity Java

  • Get instance of button by find by Id.
  • Set an action Listener on button.
  • Add a new function for display notification in status bar.
  • Pass the title and details to the function.

Step 4: Create another activity for Notification

  • Add text to display

Step 5: Create a Java for Notification Activity

  • Add onCreate function to render notification activity.

Step 6: Update Android Menifest file

  • Add an entry for new created activity