Услуги Android переднего плана Set Auto Cancel не работает

AutoCancel does not work when service is still on foreground. Try remove service from foreground:

startForeground(2, notification);
stopForeground(false); //false - do not remove generated notification