Misconceptions in Google Play Game Services

I am using the new Google Play Game services to develop my game on Android, and now I am trying to enable the invitation system. You have 3 Google+ accounts that I use to try invitations with two Android devices and 1 Android emulator.

My problem is that invitations are not always accepted when they are sent. Sometimes it works quickly and perfectly, sometimes it does not work. Just canceling the invitation and retrying can change the result.

Here are 3 tests I did to make them clearer:

Test 1: the emulator was invited, Nexus 4 did not receive, and Optimus One received

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

Test 3: Optimus One was invited, emulator received and Nexus 4 did not receive

From these results, we see that my Nexus 4 did not receive any invitations, but it worked several times before these tests.

In addition, sometimes I get an invitation notification (in the status bar), but most of the time I don’t receive it.

Has someone experienced the same anomalies as me?

+4
source share
4 answers

This may be due to the accounts you are logged into. I found that I can send invitations from my dev account to the "test" account, but not vice versa.

+2
source

If you use a Wi-Fi access point (wireless router) for testing, and there are other Wi-Fi access points nearby, they can interfere with your Wi-Fi signal and block game invitations. Although the 2.4 GHz band used by most routers has 11 channels, most wireless routers use the same channel by default (6). If you are in this situation, try changing the channel that your router uses.

This problem made me embarrassed for several weeks.

+1
source

Some pointers:

  • Make sure all test accounts have each other in their circles. So, if your test accounts are A, B, and C, then A must have B and C in their circles, B must have A and C, and C must have A and B.

  • The time required to deliver the invitation may vary; Network connectivity is a big factor in this. Do not give up too soon - wait up to 1 minute without leaving the handshake process, and an invitation should appear.

  • If the game is not published, make sure that all test accounts are listed in the "Testing" section of the application settings in the developer console. If a tester is not specified, they will not receive a pop-up prompt. Note. Even the developer who created the application in the developer console must be listed as a tester.

0
source

If you use Games.Invitations.registerInvitationListener() , your code is expected to process the invitation and you will not receive standard Android notification. Now, if you do not call Games.Invitations.unregisterInvitationListener() at appropriate points in time, your code may not correctly handle the invitation, and it will consume it without your will.

0
source

Source: https://habr.com/ru/post/1483998/


All Articles