// Cancel older notification with same id, NotificationManager notificationMgr = ( NotificationManager ) context . getSystemService ( Context . NOTIFICATION_SERVICE ); notificationMgr . cancel ( CALL_NOTIFY_ID ); // any constant value // Create Pending Intent, Intent notificationIntent = null ; PendingIntent contentIntent = null ; notificationIntent = new Intent ( context , YourActivityName ); contentIntent = PendingIntent . getActivity ( context , 0 , notificationIntent , PendingIntent . FLAG_UPDATE_CURRENT ); // Notification builder builder = new NotificationCompat . Builder ( context ); builder . setContentText ( "Ongoing Notification.." ); builder . setContentTitle ( "ongoing notification sample" ); builder . setSmallIcon ( R . drawable . notification_icon ); builder . setUsesChronometer ( true ); builder . setDefaults ( Notification . DEFAULT_LIGHTS ); builder . setContentIntent ( contentIntent ); bu
This blog is for ANDROID developers which contains information about development, resolutions of common issues and much more about ANDROID...