google play services - InvitationID null in production but not in the same apk installed manually -
i have strange beaviour in game. first of all, have 2 version: paid , free, linked in same play service id.
i developed , try apps, , work perfectly, put them in production, on google play. discover feedback paid version, when accept invitation, don't handle, becouse it's null! in free version instead, works fine. code same.
how possible?
the same apk installed manually works, put on google play doesn't works.
anyone has problem?
this code:
@override public void onsigninsucceeded() { super.onsigninsucceeded(); log.i(gameprops.tag, "invitation: "+getinvitationid()); if (getinvitationid()!=null) { intent intent=new intent(this, onlinegamescreen.class); intent.putextra(gameprops.invitation_id, getinvitationid()); startactivity(intent); } } getinvitationid() return null. how possibile?
bye.
i solved. code before changed this:
@override public void onsigninsucceeded() { super.onsigninsucceeded(); getgamesclient().loadinvitations(new oninvitationsloadedlistener() { @override public void oninvitationsloaded(int statuscode, invitationbuffer buffer) { arraylist<long> timestamps=new arraylist<long>(); (invitation invitation:buffer) { timestamps.add(invitation.getcreationtimestamp()); } collections.sort(timestamps); if (!timestamps.isempty()) { (invitation invitation:buffer) { log.i(gameprops.tag, "invitation buffer: "+invitation.getinvitationid()); if (invitation.getcreationtimestamp()==timestamps.get(timestamps.size()-1)) { invitationid=invitation.getinvitationid(); } } } log.i(gameprops.tag, "invitation: "+invitationid); if (invitationid!=null) { intent intent=new intent(mainscreen.this, onlinegamescreen.class); intent.putextra(gameprops.invitation_id, invitationid); startactivity(intent); } } }); } so have googleplaygames lib buggy, becouse getinvitationid() doesn't work correctly. expecially becouse works if apk installed manually, , not app downloaded playstore.
it's happend 2 of 4 of apps, think remain mistery.
Comments
Post a Comment