HaxeExtension / extension-googleplaygames

OpenFL extension for Google Play Games / Android
Other
52 stars 17 forks source link

No callback triggered when calling GPG save data load. #20

Open smks opened 8 years ago

smks commented 8 years ago

public static var loadSavedGame(default,null) : String->Void = function(name:String):Void{}

^^ I firstly init the Google Play Games, I then call load saved game and pass a callback. The callback never gets triggered I noticed.

private function onLoadSavedGameComplete(name:String, statusCode:Int, data:String) {

    trace('load saved game returned ' + name + ' ' + statusCode + ' ' + data);

    if(onLoadGameComplete!=null) onLoadGameComplete(name,data);
}

private function onLoadSavedGameConflict(name:String, data:String, conflictData:String) {

    trace('load saved game conflicted ' + name + ' ' + data + ' ' + conflictData);

    if(onLoadGameConflict!=null) onLoadGameConflict(name,data,conflictData);
}

Nothing is ever traced.

typedef API = extension.multigames.Multigames;

API.loadSavedGame(GAME_SAVE_ID);

//// CLOUD 
///////////////////////////////////////////////////////////////////////////

public static function loadSavedGame(name:String){
    #if gpgnative
    trace('is google native');
        GooglePlayGames.loadSavedGame(name);

Basically I cannot load saved data?

fbricker commented 8 years ago

Hi, this is strange. You should at least get some info on your android logs (using logcat). You should check your android logcat to see what's going on (you should also check if you've enabled saved games feature on your google play games console and that the user on the cellphone has logged in properly into google play games).

Please check this and let me know what happens.