[Bug] Google play enabled game won't start if there's not network

I have an android game which has google play services enabled, i’m close to deployment so i’m trying to solve the bugs i can find, some of them are related to when there’s not network (either data or wifi) for google play services to connect with:

First, when the game starts it tries to connect to google play services. If it couldn’t connect it’ll stay with a black screen and never actually start or some rare times it’ll show an “App stopped working” Error. Then if i disconnect the network while the game is being played, if i try to show the achievements screen or leaderboards screen it’ll show as they where loading forever, so i tried with the Connect to service node and show the leaderboards and achievements only On Success, but it still tries to show the leaderboard so i guess that even though there’s no network the game still thinks it can connect to the services.

Here’s my logcat for when i try to start the game without a network

Hi DylanVelez,

Does the game you’re making have services like achievements and leaderboard? Those services are always going to attempt to check that Google Play service is available, and your app won’t run without a network connection. Here is the Android Development documentation on Play Services. You can see in your logcat where the device attempts to contact Google Play and cannot find a connection:

V/GamesNativeSDK( 9372): Play Games
callback indicates connection failure.

If your game does not contain any services that require a connection to Google Play, then it should not attempt to connect.

Yes my game does have both achievements and leaderboard services but however i’d think that if the game can’t connect on startup it should still start the game and be playable except for the part that requires google play services, for example if there’s no connection to the services just don’t show the leaderboards or don’t write the achievements. I know this could be modified in the GameHelper.java file so it doesn’t connect if there’s no network but i can’t find it and neither do i want to modify it so i don’t mess with the engine.

Hi DylanVelez,

While that may in fact be configurable, it is not a bug; google play services are working as intended so I am marking this resolved. You might try asking in the blueprints/C++ section of AH or forums. Also, I found this Stack Overflow thread that seems relevant.

Good luck!

Oh, well glad to be informed that it isn’t a bug and sorry for posting this as such.