In my React Native app I'm using AppState to try and detect when the app goes to the background, vs when it's completely closed down. I want to trigger separate functions for each. But from their documentation it looks like when the app is backgrounded or closed, the same thing happens: it goes from active to inactive and then to background.
Is there any way to trigger separate functions when the app is closed vs backgrounded?
You can check below code: