int icon = R.drawable.icon4;
CharSequence tickerText = \"Hello\"; // ticker-text
long when = System.currentTimeMillis();
Context context = getApplicatio
You should read the whole things not just a part, buddy. Please re-read carefully step-by-step.
// this
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
int icon = R.drawable.icon4;
CharSequence tickerText = "Hello"; // ticker-text
long when = System.currentTimeMillis();
Context context = getApplicationContext();
CharSequence contentTitle = "Hello";
CharSequence contentText = "Hello";
Intent notificationIntent = new Intent(this, Example.class);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
Notification notification = new Notification(icon, tickerText, when);
notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
// and this
private static final int HELLO_ID = 1;
mNotificationManager.notify(HELLO_ID, notification);