Is there any good way (or event listener) to keep track on app termination?


I’m using a Plugin to show native media controls on android on the lockscreen and notification center. After the app gets terminated, the controls are still visible. I’m searching for a way the recognize if the app gets terminated, so I can call a function to hide the native control elements.


On Android plugins can override the handleOnDestroy method to do any needed cleanup work.
On iOS plugins can implement the deinit method to do any needed cleanup work.

Do you have an example how I can use it in my TypeScript Code?

it’s on the native part (java/swift)
in the core plugins you have a few examples

1 Like