Question

I am using the new Google Play Game Services to develop my game on Android and I am now trying to include the invitation system. Have have 3 Google+ accounts that I use to try the invitations with 2 Android devices and 1 Android emulator.

My problem is that the invitations are not always received when they are sent. Sometimes it works fast and perfectly, sometimes it won't work. Just cancelling the invitation and trying again can change the result.

Here a 3 tests I did just to make it clearer :

Test 1: Emulator was inviter, Nexus 4 didn't receive and Optimus One received

Test 2: Nexus 4 was inviter, Emulator received and Optimus One received

Test 3: Optimus One was inviter, Emulator received and Nexus 4 didn't receive

From those results we can see that my Nexus 4 received no invitation, but it worked several times before those tests.

Furthermore, sometimes I receive the invitation notification (on the status bar), but most of the time I don't receive it.

Did someone experienced the same abnormalities as I did?

Was it helpful?

Solution

It may be to do with the accounts you are signed in on. I've found that I can send invites fine from my dev account to the 'test' account but not the other way around.

OTHER TIPS

If you are using a Wi-Fi hotspot (wireless router) for testing and there are other Wi-Fi hotspots in the vicinity, they can interfere with your Wi-Fi signal and block game invitations. Although there are 11 channels available on the 2.4 GHz band that most routers use, most wireless routers default to using the same channel (6). If you are in this situation, try changing the channel your router uses.

This problem kept me flummoxed for several weeks.

Some pointers:

  1. Check that all the test accounts have one another in their circles. So, if your test accounts are A, B and C, then A should have B and C in their circles, B should have A and C, and C should have A and B.

  2. The time it takes for an invitation to be delivered may vary; network connectivity is a large factor in that. Don't give up too early -- wait up to 1 minute without quitting the handshake process, and the invitation should appear.

  3. If the game is unpublished, make sure that all test accounts are listed in the Testing section of the application's settings on Developer Console. If a tester is not listed, they will not get an invitation popup. Note: even the developer who created the app on Developer Console must be listed as a tester.

If you are using Games.Invitations.registerInvitationListener() your code is expected to handle the invitation and you will not get a standard android notification. Now, if you are not calling Games.Invitations.unregisterInvitationListener() at the appropriate times, maybe your code is not handling the invitation properly and it is consuming it without your will.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top