audio-service

Cant dismiss notification - setActive does not work


I cant dismiss ongoing notification. It cant be dismissed programmatically - it always stays visible. User can swipe it away.

Implementation is same as here: implementation example

I want it to dismiss when the user closes this screen.

This does not work:

final session = await AudioSession.instance;
await session.setActive(false);

Solution

  • Fixed by adding super.stop(); to overriden stop method. Thanks !