Tag Archives: StatusBarNotification

Adding Notifications, Reading Notifications, Getting number of notifications in Android M.

By | February 20, 2016

This demo will show how to 1. Create and add a new Notification, 2. How many notifications are active in the current Application? 3. Delegate method for Notification Deletion. For Adding a Notification we can use the following snippet. [java] // Create a Notification and notify the system. final Notification.Builder builder = new Notification.Builder(getActivity()) .setSmallIcon(R.mipmap.ic_notification) .setContentTitle(getString(R.string.app_name)) .setContentText(getString(R.string.sample_notification_content)) .setAutoCancel(true)… Read More »