My current Android game employs BaseGameActivity.
My game employs Achievements, which are getting unlocked when required.
However, I do not ALWAYS see the PopUps related to the unlock event.
I know the popup only appears when you first unlock the Achievement.
Some popups appear fine, others (from different screens within my game) never appear.
What do I have to do to Guarantee the popups appear?
I have a feeling its related to this WARNING:
W/PopupManager(10725): You have not specified a View to use as content view for popups.
Falling back to the Activity content view which may not work properly in future versions
of the API.
Use setViewForPopups() to set your content view.
I have called setViewForPopups()
from within the activity my popups do not display in, however, I have never seen them.
How do you call setViewForPopups()
so that your entire application never sees the WARNING messages shown above?
There has been some changes in recent update to play services framework. Use this instead so that you can see greeting popup and unlock popups as well.
GamesClient gamesClient = Games.getGamesClient(this, GoogleSignIn.getLastSignedInAccount(this));
gamesClient.setViewForPopups(findViewById(android.R.id.content));
gamesClient.setGravityForPopups(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
Don't forget to import as required like-
import android.view.Gravity;
import com.google.android.gms.games.GamesClient;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With