0

So I am working on a game that is similar to Pokemon Go but I am having an issue with the map. First off, the map is based on the Google Maps api, and I am spawning items on the map at random locations. I am implementing a menu option to show inventory and such but when I return from the menu, the map regenerates all objects on the map like its recreating the activity.

My main question is how would I make it so that the map and all the data on it is saved when returning from the menu? Should I make the menu a fragment? Because currently it is an activity.

MrUpsidown
  • 21,592
  • 15
  • 77
  • 131
Nukodi
  • 335
  • 1
  • 9
  • 24

1 Answers1

0

Maybe you should change your code to get the coordinates out of a database. You could use SQLite and save the databases locally. Just make a table in which the items (which should already be defined, too, in a separate table) are assigned to a location. And your code must then simply call up the data from there when calling up the map and then insert the corresponding symbols on the map.

Krone12
  • 1
  • 3