I have a notification in my app with the following code:
//Notification Start
notificationManager = (NotificationManager) getSystemService(Context.NOTIFI
public void addNotification()
{
NotificationCompat.Builder mBuilder=new NotificationCompat.Builder(MainActivity.this);
mBuilder.setSmallIcon(R.drawable.email);
mBuilder.setContentTitle("Notification Alert, Click Me!");
mBuilder.setContentText("Hi,This notification for you let me check");
Intent notificationIntent = new Intent(this,MainActivity.class);
PendingIntent conPendingIntent = PendingIntent.getActivity(this,0,notificationIntent,PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(conPendingIntent);
NotificationManager manager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
manager.notify(0,mBuilder.build());
Toast.makeText(MainActivity.this, "Notification", Toast.LENGTH_SHORT).show();
}