0

I'm doing an little game application on Android. My main activity extends BaseGameActivy so it is connecting to google play automatically when I open the apps. I'm trying to display the 'Connecting' pop-up menu on the top of the activity and it doesn't work. The google docs says

You can customize how the Google Play Games 'Connecting' pop-up is displayed during sign-in >by using setShowConnectingPopup().

I tried this line in my 'onCreate' in the main activity:

Games.GamesOptions.builder().setShowConnectingPopup(true, Gravity.TOP);

but it still doesn't work.

1 Answers1

0

Where you define the Builder() for your GoogleApiClient you need to add the Api you want and define the desired GoogleApiClient.ApiOptions for that particular Api (and don't forget to call the build() method). In your case you should do something like this in your onCreate():

        GoogleApiClient.ApiOptions apiOptions = Games.GamesOptions.builder().setShowConnectingPopup(true, Gravity.TOP).build();
        GoogleApiClient googleApiClient = new GoogleApiClient.Builder(this)
            .addApi(Games.API, apiOptions)
            .build();
Geoff
  • 23
  • 5