I want to fetchdata from server when my app closed (in background || died) and stop fetching when it again opened.
So I need to call a function right after app goes to backgroundstate or even force closed (died) and stop it when comes again to foreground.
How can I do it with react-native to be work on both Android and IOS?
I prefer if it is possible without any third party libs, because most third party libs are not maintained in long term.