Best code examples for Android Notification class (android.app.Notification)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Notification class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android Notification examples from Open Source projects
This code example shows how to use the following methods: setLatestEventInfo
27:	Notification notification = new Notification(0x7f020000, 
-
32:	notification.setLatestEventInfo(context,"Payment Reminder","Send me to jhaynie@appcelerator.com",contentIntent); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
58:	Notification notification = new Notification(context.getApplicationInfo().icon, 
-
64:	notification.setLatestEventInfo(context, serviceTitle, serviceDescription, pIntent); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
18:	Notification notification = new Notification(); 
19:	notification.setLatestEventInfo(new Activity(), "title", "content", pendingIntent); 
Full Snippet Info
8
CodeRank
Related Android Notification Questions & Answers:
Other Android Notification Examples
23:	    // Build notification
24:	    // Actions are just fake
25:	    Notification noti = new Notification.Builder(this)
26:	        .setContentTitle("New mail from " + "test@gmail.com")
27:	        .setContentText("Subject").setSmallIcon(R.drawable.icon)

Read More

92:	        NotificationManager notificationManager = (NotificationManager)
93:	                context.getSystemService(Context.NOTIFICATION_SERVICE);
94:	        Notification notification = new Notification(icon, message, when);
95:	        
96:	        String title = context.getString(R.string.app_name);
-
92:	        NotificationManager notificationManager = (NotificationManager)
93:	                context.getSystemService(Context.NOTIFICATION_SERVICE);
94:	        Notification notification = new Notification(icon, message, when);
95:	        
96:	        String title = context.getString(R.string.app_name);

Read More

Notification Class Overview
A class that represents how a persistent notification is to be presented to the user using the NotificationManager.

The Notification.Builder h...
Methods
  • setLatestEventInfo
    This method was deprecated in API level 11. Use Notification.Builder instead.