Google Play Games achievement unlocked popup not showing

后端 未结 4 1002
一生所求
一生所求 2020-12-06 06:43

I\'m unlocking achievement using this simple method from developers docs:

Games.Achievements.unlock(getApiClient(), \"my_achievement_id\");

4条回答
  •  隐瞒了意图╮
    2020-12-06 07:25

    Just add a view to the layouts you want to display achievements on like this:

    
    

    When you have your layout ready you neet to execute this inside your Activity or Fragment:

    Games.setViewForPopups(getApiClient(), findViewById(R.id.gps_popup));
    

    You have to be sure, that your GoogleApiClient is connected though, otherwise your app will crash.

提交回复
热议问题