I want to implement voice actions, "start running" and "stop running".
"Start running" works fine, but "stop running" doesn't work.
My app has one activity with several fragments. When I speak "stop running", the activity is destroyed and created. My workout data is lost.
- setRetainInstance(true) has no effect.
- Change launchMode to singleTask/singleTop/singleInstance has no effect.
- I saved workout data in onSaveInstanceState(), but it's lost when a new activity is created.
Is there any other way?