I am having another issue which you may have a better understanding of, even when all snapshots are deleted from google play services I keep getting an object back of length 0 when calling gsClient.loadGameState().....
Steps:
-call gsClient.deleteGameState() on desktop, exit app
-call gsClient.loadGameState() multiple times on desktop always returning null which is ok, exit app
-call gsClient.loadGameState() on android first call returns null all following calls return an array with length 0, exit app
-call gsClient.loadGameState() on desktop again and return is an array with length 0
very strange as I am not saving anything at all, maybe I am missing something?
public void loadSnapshot(){
if(gsClient.isFeatureSupported(GameServiceFeature.GameStateStorage)) {
gsClient.loadGameState("test", this);
}
else{
Gdx.app.error("loadSnapshot: ", "GameStateStorage not supported by client");
}
}
@Override
public void gsGameStateLoaded(byte[] gameState) {
if(gameState != null){
Gdx.app.error("onGameStateLoaded", "gamestate size is =" + gameState.length);
}
else{
Gdx.app.error("onGameStateLoaded", "gamestate is null" );
}
}
UPDATED:
From lidgdx forum pm discussion with MrStahlfelge:
" It is probably because Android's GPGS gamestate creates a subdirectory causing the desktop implementation to return a 0-sized array (because there is something but no file)."
I guess the issue still remains that on android platform the returned value is not consistent with what is expected and the data can be null or invalid/reference to some empty object....?
I am having another issue which you may have a better understanding of, even when all snapshots are deleted from google play services I keep getting an object back of length 0 when calling gsClient.loadGameState().....
Steps: -call gsClient.deleteGameState() on desktop, exit app -call gsClient.loadGameState() multiple times on desktop always returning null which is ok, exit app -call gsClient.loadGameState() on android first call returns null all following calls return an array with length 0, exit app -call gsClient.loadGameState() on desktop again and return is an array with length 0
very strange as I am not saving anything at all, maybe I am missing something?
UPDATED: From lidgdx forum pm discussion with MrStahlfelge:
I guess the issue still remains that on android platform the returned value is not consistent with what is expected and the data can be null or invalid/reference to some empty object....?