I found a "solution" that works.
Just call the new RemoteView without a progress bar on its layout when the task is completed
In the tutorial that I'm using, I have this progress.xml:
notification.contentView = new RemoteViews(getApplicationContext().getPackageName(), R.layout.progress);
when the task makes a 100% call:
notification.contentView = new RemoteViews(getApplicationContext().getPackageName(), R.layout.done);
so layout done.xml replaces progress.xml
source share