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
This code example shows how to use the following methods: setLatestEventInfo
28:	Notification notification = new Notification(0x7f020000, 
-
33:	notification.setLatestEventInfo(context,"Payment Reminder","Send me to jhaynie@appcelerator.com",contentIntent); 
Full Snippet Info
-307
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
7
CodeRank
This code example shows how to use the following methods:
92:	Notification n = new Notification(opn.getDrawable(), opn.getTickerText(), currentTimeMillis()); 
-
104:	return new ProgressNotification(n, viewIds); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
47:	Notification notification = new Notification(icon, title, System.currentTimeMillis()); 
48:	notification.setLatestEventInfo(mContext, title, text, mIntent); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
259:	notification.setLatestEventInfo(c, contentTitle, contentText, contentIntent.getPendingIntent()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
88:	new Notification(android.R.drawable.stat_notify_chat, 
-
91:	n.setLatestEventInfo(this, "Update Ready to Install", 
-
95:	return(new NotificationConfirmationStrategy(n)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
64:	Notification n = new Notification(opn.getDrawable(), opn.getTickerText(), currentTimeMillis()); 
65:	n.setLatestEventInfo(context, opn.getEventTitle(), opn.getEventDetail(), manageGitRepo); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
19:	private Notification notification1 = new Notification(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
18:	Notification notification = new Notification(Helper.tryToGetIconFormStringOrGetFromApplication(data.getString("i"), context), tickerTitle, System.currentTimeMillis()); 
19:	notification.setLatestEventInfo(context, header, message, notification.contentIntent); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: clone
119:	this.uid, this.initialPid, this.score, this.notification.clone()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
31:	"", 0); // <4> 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
18:	public SimpleNotificationFactory(Context context, Bundle data, String header, String message, SoundType soundType, VibrateType vibrateType) 
19:	{ 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
60:	mNotificationCheckEngine = new Notification (checkEngineDrawableResourceID,tickerText, when); 
-
68:	mNotificationCheckEngine.setLatestEventInfo(mCallerContext,"Check Engine", infoText, pi); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
35:	Notification notification = new Notification(android.R.drawable.stat_notify_error, "Welcome", 
-
44:	notification.setLatestEventInfo(context, "ClockActivity", "Les exemples Digit books sont install�s", contentIntent); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo, sleep
373:	Notification notification = new Notification(android.R.drawable.stat_notify_sync, message, currentTime); 
-
375:	notification.setLatestEventInfo(this, "Open eCard App", "", null); 
-
379:	Thread.sleep(2000); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
295:	mUsbStorageNotification = new Notification(); 
-
314:	mUsbStorageNotification.setLatestEventInfo(mContext, title, message, pi); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
53:	Notification notification = new Notification( 
-
58:	notification.setLatestEventInfo( 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
189:	Notification note = new Notification(R.drawable.sym_call_incoming, phone + " : " + msg , System.currentTimeMillis()); 
-
194:	note.setLatestEventInfo(context, "Sms from " + phone, msg, activity); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo, notify
74:	getMyNotificationManager().notify(tag.hashCode(), noti); 
-
111:	Notification noti = new Notification(); 
-
125:	noti.setLatestEventInfo(context, contentTitle, contentText, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
32:	Notification note = new Notification(iconId, marquee, System.currentTimeMillis()); 
33:	note.setLatestEventInfo(mContext, title, message, pi); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo, notify
41:	getNotificationManager().notify(NOTIFICATION_ID, createNotification()); 
-
103:	Notification notification = new Notification(); 
-
111:	notification.setLatestEventInfo( 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
127:	Notification notification = new Notification( icon, message, when ); 
-
134:	notification.setLatestEventInfo( context, title, message, intent ); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
40:	Notification notification = new Notification(icon, notificationText, when); 
-
48:	notification.setLatestEventInfo(app.getApplicationContext(), title, text, contentIntent); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo, notify
70:	final Notification notification = new Notification(icon, tickerText, 
-
77:	notification.setLatestEventInfo(c, contentTitle, contentText, 
-
83:	.notify(NOTIFICATION_ID, notification); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
111:	Notification notification = new Notification(notifyIconId, tickerText, 
-
114:	notification.setLatestEventInfo(this, title, text, intent); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: clone, setUser
71:	this.notification.setUser(user); 
-
127:	this.score, this.notification.clone(), this.user); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setLatestEventInfo, notify
70:	final Notification notification = new Notification(icon, tickerText, 
-
77:	notification.setLatestEventInfo(c, contentTitle, contentText, 
-
83:	.notify(NOTIFICATION_ID, notification); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
33:	System.currentTimeMillis()); 
34:	notification.setLatestEventInfo(context, tickerText, tickerText, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
54:	new Notification(icon, name, when); 
-
61:	notification.setLatestEventInfo(ctx, intent.getExtras().getString(NOTIFY_LAYOUT_SWITCH_NOTIFICATION_TITLE), name , pi); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo, notify
36:	Notification var9 = new Notification(17301632, var6, var7); 
-
51:	var9.setLatestEventInfo(var11, var12, var16, var10); 
-
62:	((NotificationManager)var21.getSystemService("notification")).notify(1000, var9); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
18:	notificacion = new Notification(iconId, textoEvento, System.currentTimeMillis()); 
19:	notificacion.setLatestEventInfo(contexto, titulo, descripcion, intent); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
43:	Notification notification = new Notification( iconResourceId, content, System.currentTimeMillis() ); 
-
50:	notification.setLatestEventInfo( context, title, content, pendingIntent ); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
132:	final Notification doneNotification = new Notification(doneIcon, doneTitle, System.currentTimeMillis()); 
-
134:	doneNotification.setLatestEventInfo(mContext, doneTitle, doneText, doneIntent); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setLatestEventInfo
42:	Notification mNotification = new Notification(icon, tickerText, 
-
60:	mNotification.setLatestEventInfo(context, mContentTitle, 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: toString
64:	Notification notification = new Notification(); 
-
70:	notification.toString()); 
Full Snippet Info
5
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

See Code Examples for Android Notification Methods: