Android Foreground Services Ustaw automatyczne anulowanie, które nie działa

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