Android LoadState issue with apps using Monkey v67

Monkey Targets Forums/Android/Android LoadState issue with apps using Monkey v67

marksibly(Posted 2013) [#1]
Hi,

There is a bug in Monkey v67 through v70 that causes LoadState to ignore the previously saved state if it had been created with SaveState from Monkey V66b or earlier.

This is totally my fault - I renamed the 'key' used to save the app state under in v67 while rearranging/refactoring a bunch of other stuff. My apologies...

I have fixed this in V70b (up soon) so that LoadState now looks for both new AND old states (looks for new first). SaveState always saves to new state.

However, it's possible that if you've uploaded an app built using Monkey >=v67 and <v70b, that is an update to an app built using Monkey <67, the user will have lost their save games.

To help deal with this, I've added a temp LoadState_V66b() function to V70b (Android only) that allows you to access the old state.

You'd probably want to confirm with the user before just blindly using an old save game though, as they may have made considerable progress with the new one...


benmc(Posted 2013) [#2]
Thanks for this update.

EDIT: Deleted what I wrote because I want to re-think it.

Basically, I'm trying to figure out the process by which I can verify that data has been loaded and re-saved from the old saved state, followed by setting flags for all future updates of the game including saved game data resets. I also need to know how to trash the old data once it has been transferred to the new SaveState so that in case they ever want to clear scores I don't end up re-loading really old data that I couldn't delete because it was saved in v66.


marksibly(Posted 2013) [#3]
Actually, a SaveState_V66b would probably be help too - you could then 'clear' the v66 state by setting it to "". So the process would be something like:

Local state:=LoadState()
Local state_v66b:=LoadState_V66b()
If state and state_v66b
   'check with user! Do you want to use old game save instead of new one?
   '
   If yes_please state=state_v66b
Endif
SaveState state
SaveState_V66b ""



benmc(Posted 2014) [#4]
It appears the LoadState_V66b function is no longer in the latest versions of Monkey. How do we recover saved states of older games we are now updating?