react-native-foreground-service icon indicating copy to clipboard operation
react-native-foreground-service copied to clipboard

Kill on destroy

Open mattveraldi opened this issue 4 years ago • 2 comments

Hi, I needed to add this behaviour to my react-native app, so I implemented this notificationConfig. Feel free to merge it if you think it's useful. Best regards.

mattveraldi avatar Apr 11 '20 14:04 mattveraldi

+1 would like this added

hazelf42 avatar Feb 02 '21 23:02 hazelf42

@mattveraldi It's killing the notification but when I checked the app status on the app info it seems app still working in the background and the option 'force stop' is available. And I checked it starting the service causing this without foreground service when I kill the app there is no 'force stop' option available. I think it's not exactly killing the service. I had to add

android.os.Process.killProcess(android.os.Process.myPid());
System.exit(0);

to the onHostDestroy method of the module

esinanturan avatar Feb 16 '21 15:02 esinanturan