玩游戏loadLeaderboardMetadata()返回过时的数据

编程入门 行业动态 更新时间:2024-10-28 07:18:56
本文介绍了玩游戏loadLeaderboardMetadata()返回过时的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在玩游戏服务的应用程序,我正在做一个自定义的用户界面,显示排行榜的名单,只有得分和玩家的排名为动态数据。

I'm working on an app with Play Game Services, and I'm making a custom UI to display the list of leaderboards with only the score and the ranking of the player as dynamic data.

然后,当用户点击分数或排名,他将采取排行榜默认的UI显示在细节这个特殊的排行榜。

Then, when the user clicks on the score or ranking, he will be taken to the leaderboard default UI to display this particular leaderboard in details.

在换句话说:我正在做一个自定义的用户界面leadeboards名单,但我用默认的用户界面来显示特定的排行榜

In other words: I'm making a custom UI for leadeboards list, but I use default UI for displaying a specific leaderboard.

我用loadLeaderboardMetadata()方法来获得排行榜的数据。问题是,它返回过时的数据,甚至当我使用loadLeaderboardMetadata(背景下,真正的)来强制数据的重新加载。

I use loadLeaderboardMetadata() method to get the leaderboards data. The problem is it returns outdated data, even when I use loadLeaderboardMetadata(context, true) to force the reloading of data.

此外,如果我点击一个过时的分数显示特定排行榜的默认用户界面,这里的数据是最新的! ......然后,如果我回到我的排行榜名单,并强制在装载数据,然后为这个特定的领先的数据将是最新的(而不是数据的其他排行榜)。

Moreover, if I click on an outdated score to display a specific leaderboard with the default UI, the data here is up to date ! ... and then, if I go back to my list of leaderboards and force the data reload, then the data for this specific leaderboard will be up to date (but not the data for other leaderboards).

任何想法和/或方法可以解决呢?

Any idea and/or ways to work around that?

感谢你在前进,

斯特凡。

推荐答案

我终于发现,通过使用替代loadLeaderboardMetadata方法loadCurrentPlayerLeaderboardScore,似乎工作。

I finally found that by using the loadCurrentPlayerLeaderboardScore instead of the loadLeaderboardMetadata method, it seems to work.

更新:除了这个方法实在是太慢了,如果你有30个排行榜,并引发错误,因为您对对API的调用得多,所以它不是一个可行的选择。除非你有非常少的排行榜。

Update: Except that this method is really slow if you have 30 leaderboards, and it throws error because you make to much call to the API's, so it is not a viable option. Except if you have very few leaderboards.

更多推荐

玩游戏loadLeaderboardMetadata()返回过时的数据

本文发布于:2023-06-04 19:05:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/503297.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:玩游戏   数据   loadLeaderboardMetadata

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!