android - Turnbased matches disappear after loading for the first time -


i'm developing game android using google play services creating turnbased match.

at first fine load turnbased matches signed in user using

games.turnbasedmultiplayer.loadmatchesbystatus(getapiclient(),         new int[]{turnbasedmatch.match_turn_status_my_turn,                 turnbasedmatch.match_turn_status_their_turn,                 turnbasedmatch.match_turn_status_invited,                 turnbasedmatch.match_turn_status_complete})         .setresultcallback(this); 

it loaded matches of given states. since last weekend callback called there no matches, i'm not participating in match (status response ok). deleted cache of google play services on phone , rebooted device. @ moment matches shown again until next time opened app. again matches missing. once start new match match keeps showing above method (refreshing list) until close app. @ next launch match gone.

i have game not published yet in test phase on google play developer console. found same issue on emulator. ran fine days got same problem real device (with later build not single change of code causes this).

did else notice behaviour or has idea on how resolve it?

might related having multiple apps connected 1 game? had 2 apps signed debug certificates connected , afternoon added 1 signed apk. when used signed apk worked again until deployed new test app (debug signed). after switching signed apk bug still around.

as nobody seems know answer let me rephrase question. should cache turnbasedmatches myself on device? deleted play services cache again , reopened app. result? list of hundreds of games (since have start new game every time while testing...)

my code handle loadmatchesresult

@override public void onresult(turnbasedmultiplayer.loadmatchesresult loadmatchesresult) {     showtoast("gotmatches status: " + loadmatchesresult.getstatus().getstatuscode());      //add matches listview (only caching matchid, no references turnbasedmatch)      loadmatchesresult.getmatches().getmyturnmatches().close();     loadmatchesresult.getmatches().getinvitations().close();     loadmatchesresult.getmatches().gettheirturnmatches().close();     loadmatchesresult.getmatches().getcompletedmatches().close();     loadmatchesresult.release();  } 

found interest point.. starts issue occurs when deploying new apk device... once deploy new apk (either install alpha version google play or directly debug version android studio) matches gone. when don't change apk can reboot phone/close app , works fine...

issue occurs if update app through play store... there should more people having problem!

gotten https://developer.android.com/reference/com/google/android/gms/common/api/pendingresult.html#setresultcallback(com.google.android.gms.common.api.resultcallback)

after result has been retrieved using await() or delivered result callback, error attempt retrieve result again. responsibility of caller or callback receiver release resources associated returned result. result types may implement releasable, in case release() should used free associated resources.

after retrieve result, error given when try results again, until free resources associated returned result, why clearing cache works make them visible again. need either access device's cache , display results there well, or clear associated resources (within program) whenever want access results again.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -