Xamarin Android: Convert PendingResult parameter to SubmitScoreResult -
i'm trying score submitted google play services games:
var pendingresult=gamesclass.leaderboards.submitscoreimmediate (mgoogleapiclient,leaderboardid,score); pendingresult.setresultcallback (this);
the operation succeeds , callback called:
public void onresult(java.lang.object arg) { var result=arg android.gms.games.leaderboard.ileaderboardssubmitscoreresult; }
however result null, "arg" contains seems valid object.
how can convert arg leaderboards.submitscoreresult, object should appear here according play services games documentation?
since using submitscoreimmediate
, can convert use c#-style async version submitscoreimmediateasync
, avoid callback/listener:
var result = await gamesclass.leaderboards.submitscoreimmediateasync(mgoogleapiclient, "stackoverflow", 22747); var statuses = result.status; var scoresubmissiondata = result.scoredata;
Comments
Post a Comment