I am creating notification from a intent service using startForeground(id,notification).
Random r=new Random();
int id=r.nextInt(9999);
Builder notice2=new Notification.Builder(getApplicationContext())
    .setContentTitle(call.getName())
    .setAutoCancel(true)
    .setContentIntent(intent)
    .setContentText("content")
    .setSmallIcon(com.project.calltracker.R.drawable.ic_alert)
    .setLargeIcon(BitmapFactory.decodeResource(getResources(), com.project.calltracker.R.drawable.ic_logo));
startForeground(id, notice2.getNotification());
Here I have set AutoCancel(true)
But when I click on the notification it does not disappear??
I am really confused. I have tried everything for last couple hours but still no luck!
Please help!
Thanks!
 
     
     
     
    