3

I looked for help here listener1 and here listener2 and did the same suggestions hoping for a fix, but I still get the function onInvitationReceived triggering like only 20% of the time.

Launching the intent to show the invitation inbox however shows that the invitations are there all the time.

Before testing I make sure i don't have pending invites as I think subsequent invites are not triggered.

Any solution for this not involving timer based call to the getGamesClient().loadInvitations? (very hacky way to test for invites).

Really onInvitationReceived should trigger as a call to getGamesClient().getInvitationInboxIntent() shows that there are invites living in there.

Is there something I should do/ not do? or is it a GooglePlay API bug? or what is it? (Hoping for an answer from the GooglePlay devs).

Devices are both Nexus 7, one with Android 4.3 and the other 4.2.2

Community
  • 1
  • 1
ZhuZhi
  • 48
  • 7

2 Answers2

0

I think it was infact an issue with Google. That is why the GamesClient class is now deprecated.

I have recently started using GoogleApiClient and the Games class as suggested by the android developers and I receive invitations reliably now. :)

Ogen
  • 6,499
  • 7
  • 58
  • 124
  • I just refactored the code to use the shiny new non-plug and play non compatible google api...and I still don't get invitations reliably, the same as when using the old API. – ZhuZhi Apr 24 '14 at 13:17
  • Also, using the timer and and polling solution to force get those invitation using Games.Invitations.loadInvitations works, while the onInvitationReceived is waiting forever for father santa. – ZhuZhi Apr 24 '14 at 13:21
0

New google API doesn't solve this issue. (tested and confirmed).

The best way I found around this unfixed bug (unfix-able by google?) is to use a timer to poll for the invitations using Games.Invitations.loadInvitations in addition to listening to onInvitationReceived.

ZhuZhi
  • 48
  • 7