Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/202.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何显示首次公开排行榜而不是圆形排行榜?_Android_Google Play Services_Google Play Games_Leaderboard - Fatal编程技术网

Android 如何显示首次公开排行榜而不是圆形排行榜?

Android 如何显示首次公开排行榜而不是圆形排行榜?,android,google-play-services,google-play-games,leaderboard,Android,Google Play Services,Google Play Games,Leaderboard,当您使用以下代码显示Google Play Game Services排行榜时: startActivityForResult(Games.Leaderboards.getLeaderboardIntent(getApiClient(), "333333assad87asd"), 1); 它首先显示了“圈”排行榜。我想先展示“公众”排行榜 这有可能吗?不幸的是,没有。排行榜活动控制着圈子和公众偏好。您只能访问活动的意图,因此无法修改它。实际上是的,有一种方法可以首先显示公共变量。花了相当长的时

当您使用以下代码显示Google Play Game Services排行榜时:

startActivityForResult(Games.Leaderboards.getLeaderboardIntent(getApiClient(), "333333assad87asd"), 1);
它首先显示了“圈”排行榜。我想先展示“公众”排行榜


这有可能吗?

不幸的是,没有。排行榜活动控制着圈子和公众偏好。您只能访问活动的意图,因此无法修改它。

实际上是的,有一种方法可以首先显示公共变量。花了相当长的时间去发现,但是你需要用适当的参数来构建“意图”

   int showAllTime = LeaderboardVariant.TIME_SPAN_ALL_TIME;
   int showPublicLb = LeaderboardVariant.COLLECTION_PUBLIC
   Intent leaderboardIntent = Games.Leaderboards.getLeaderboardIntent(apiClient, menta.getString(R.string.lb_id), showAllTime, showPublicLb);

这个问题有什么解决办法吗?什么都没有?我想通过编程点击“社交”按钮,但我不知道如何收听排行榜activityLeaderboardVariant.COLLECTION\u PUBLIC的结尾,因为它不适合我。这是一个bug还是由于测试模式?