every time attempt access leaderboards within app, close automatically. however, achievements work flawlessly. getting error code 10001 (result_reconnect_required). google play website,
the googleapiclient in inconsistent state , must reconnect service resolve issue. further calls service using current connection unlikely succeed.
however, reconnecting not work.
here list of solutions found did not work me
- reinstalling app
- deleting data google play games , google play services
- checking services set properly
the code i'm using present leaderboards is:
act.startactivityforresult(games.leaderboards.getallleaderboardsintent(client), rc_sign_in); //act.startactivityforresult(games.leaderboards.getleaderboardintent(client, act.getstring(r.string.leaderboard_progression)), rc_sign_in); //single leaderboard not work either
help appreciated!
update 1:
tried using in onactivityresult():
system.out.println(client.getconnectionresult(games.api));
but outputs this:
connectionresult{statuscode=success, resolution=null, message=null}
on google api website, app, shows me there lot of 4xx errors. http://www.websitepulse.com/kb/4xx_http_status_codes.html,
4xx - client error
this group of http status codes indicates request resource contains bad syntax or cannot filled other reason, presumably fault of client sending request. except when responding head request, server should include explanation of error situation , whether temporary or permanent condition. these status codes applicable request method.
so this, can assume issue client-side. don't know wrong. checked sha1, app id, etc., , achievements work fine. tried updating build.gradle's dependencies latest version of play services, did not fix anything.
so figured out... though tried clearing data play games , play services without success, tried again, , works. , figured out why; used:
games.leaderboards.submitscore(client, act.getstring(id), score);
to submit leaderboard scores. however, when trying fix leaderboards, using:
pendingresult r = games.leaderboards.submitscoreimmediate(client, act.getstring(id), score); resultcallback callback = new resultcallback() { @override public void onresult(@nonnull result result) { //system.out.println(result.getstatus()); //system.out.println(result.getstatus().getstatusmessage()); //system.out.println(result.getstatus().hasresolution()); } }; r.setresultcallback(callback);
and reason, works. i've tried switching , forth between original method , new method multiple times, clearing data between each test. leaderboards work new solution. have no idea why, i'm glad works.
Comments
Post a Comment