In my DF i need to be able to differentiate between starting "from scratch" (then the DF needs to connect to the nearest ANT HR device using ANT ID: 0) and when I am "saving for later" and then "resuming" the activity (then the DF needs to connect to the same ANT ID it was connected before resuming, so instead of 0 I need to use the actual ANT ID).
I thought that in both onStop and onStart I will know if the scenario is "full start / full stop" by having state as null, and the "suspend / resume" by having something else in state. But unfortunately it seems I haven't understand the documentation because in both cases state is null.
Now my problem is that because I can't differentiate between the two onStop-s, currently even if I finished the activity I save the ANT ID, which causes the next onStart (even if it's a totally new activity) load the ANT ID, and instead of connecting the nearest ANT device it only wants to connect to the same device I used last time.
Is there a way (or trick) to differentiate?