how to do real time notification in my (own)app? <p>i am new to android. i need develop notification to my application. i have seen gcm (android hive) example and simple example of notification. </p> <p>i was confused with that example. please guide me how to do real time notication?</p> <pre><code> mn = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); nb = new NotificationCompat.Builder(this); nb.setSmallIcon(R.drawable.ic_action_mail_add); nb.setTicker("hi"); nb.setContentTitle("mail"); BitmapDrawable bd = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_action_mail); Bitmap b= bd.getBitmap(); nb.setLargeIcon(b); nb.setContentText("haii.."); nb.setContentInfo("3 unread"); nb.setAutoCancel(true); Intent in = new Intent(this,NotificationActivity.class); PendingIntent pi = PendingIntent.getActivity(this, 0, in, PendingIntent.FLAG_UPDATE_CURRENT); nb.setContentIntent(pi); </code></pre>