how can i properly save fragment state, so that its 100% reliable?
My problem is, when i take picture in my fragment, it causes my app to be killed and recreated. State of my fragment is lost.
I have tried onSaveInstanceState
which to my surprise didnt work, if app is killed after taking picture, state is lost onCreate(Bundle savedInstanceState)
savedInstanceState is null...
I have tried having state variables as static. Firstly, i dont like this solution, secondly it dont work in my special case since i have multiple instances of fragment class across application.
What is recommended approach?