Please note that the software is running well enough as it is. If you won't want to dig more it is OK.
When the tracker service starts, the data is lost. That is the only thing I can find so far.
It has to be fully functional to see the problem.
This means that a good location must be entered in the contexts spreadsheet for Home. Put your current latitude and longitude there before continuing.
It may then be used from DirAssets or Download folder.
The instructions below are to get the table to reload (and thus go through the TodoList list many times. As the software is now, it runs the LoadArrays sub each time the table loads. The objective is to get the LoadArrays sub to run once at the beginning of the code and not lose the contents of TodoList list when the table is reloaded.
When the code runs, it will beep and a notification will show us saying Contexts Nearby. Tap to Proceed.
Tap and then select Home in the menu that follows. 5 todo items will show.
Tap the back arrow to go back to the AllTodos list.
Then on the menu, select Leave Here. Select Semi from the list (scroll down on the list to see Semi). 3 Todo items will show.
Click the back arrow to see the AllTodos list.
On the menu, click See Last 'Trip'. The same 3 Todo items should show again.
If you can get that to work with LoadArrays running only once at the beginning of the program, the problem is solved.
If you watch the log, you will see it loses the TodoList when the Tracker Service is started during the code.
Note that I have no Sleep(0) statements in the code. I don't see this as a problem but I may be incorrect. I have had a lot of trouble with resumable subs and usually make them so they wait to finish using the method shown here:
https://www.b4x.com/android/forum/threads/b4x-resumable-subs-sleep-wait-for.78601/post-499130