capacitor-music-controls-plugin-for-capacitor-2 icon indicating copy to clipboard operation
capacitor-music-controls-plugin-for-capacitor-2 copied to clipboard

Notification should be destroy if app is killed

Open eamador opened this issue 4 years ago • 2 comments

Hi there!

I am using the plugin in an ionic Android app, everything works ok but i think the notification should get closed if the app is manually killed. I can see in the Android source there is a service that (seems to me) should cater for that, but it is actually not working.

/android/src/main/java/com/ingageco/capacitormusiccontrols/CMCNotifyKiller.java

@Override
public void onDestroy() {
	super.onDestroy();
	sleepWell(true);
}

Is this service's purpose to detect when the app is closed and destroy the notification? If so, looks like something is broken and needs to get fixed, otherwise could you please you advise how i could accomplish that?

Tested in Xiaomi Redmi 7A using Android 9

Thank you, Best regards. Eduardo.

eamador avatar Sep 03 '20 07:09 eamador

Good find. I found my way around rebuilding this plugin for Capacitor, but i'm unsure of how to make this work. PR will be gladly accepted.

ingageco avatar Sep 04 '20 13:09 ingageco

Hello, has this issue been resolved yet?

elieraad avatar Jan 26 '21 07:01 elieraad