android / uamp

A sample audio app for Android
Apache License 2.0
13.06k stars 3.74k forks source link

Stop MediaSessionService when the notification is deleted #520

Closed DoctorDooom closed 1 year ago

DoctorDooom commented 1 year ago

Hallo, I want to ask what is the proper way to stop the service when the User deletes the Notification. The actual implementation sends Stop command to the service without stop it. Is there a way to stop the service when the User deletes the notification? Former I used to use the PlayerNotificationManager which has Listener to catch event when user delete notification, then I have the chance to execute where ever the code what I want. NOW I want to use the MediaNotification.Provider and here I have only chance to send Intent.

Thanks in advance and thanks for support