public void setupViews(Context ctx)
{
Intent notificationIntent = new Intent(ctx, LifeDemo.class);
PendingIntent contentIntent = PendingIntent.getActivity(ctx,
0, notificationIntent,
PendingIntent.FLAG_CANCEL_CURRENT);
NotificationManager nm = (NotificationManager) ctx
.getSystemService(Context.NOTIFICATION_SERVICE);
Resources res = ctx.getResources();
Notification.Builder builder = new Notification.Builder(ctx);
builder.setContentIntent(contentIntent)
.setSmallIcon(R.drawable.ic_launcher)
.setLargeIcon(BitmapFactory.decodeResource(res, R.drawable.ic_launcher))
.setTicker("Demo Show")
.setWhen(System.currentTimeMillis())
.setAutoCancel(true)
.setContentTitle("Demo Show 1")
.setContentText("Demo Show2");
Notification n = builder.build();
nm.notify(1, n);
}