I’m currently developing an app which uses tabs and google map. What I want to do is to get the gps positions, say 3, and store them in sql db (which I’m already doing) and then display them on the map. I already created canvas, added to overlay but those points disappear when I’m changing tabs so I thought if there is a way to somehow store those coords with google map so I can retrieve them and display them nicely whenever I’m clicking the “map tab”? Please can anyone help?
Share
I don’t have the answer for you but I know the issue is being caused by the change of view. This is the same as you get when you rotate the device and the screen resets. You need to do something with the
onRestoreInstanceState(). The default of this restores the state of your UI. So you need to override it to save the data and readd it when the view changes.Hope that helps. Someone else might have a code sample.
T