【问题标题】:Android 2.2 post Highscore to google play serviceAndroid 2.2 将 Highscore 发布到 google play 服务
【发布时间】:2014-06-11 14:20:48
【问题描述】:

我正在通过 gps google play 服务使用排行榜。这是我目前从 gps 库中使用的唯一想法。
对于使用 Android 2.2 又名 Froyo 的用户,这不起作用。
有没有办法在运行 Android 2.2 的设备上将高分发布到排行榜?
对于其他设备,它工作正常。

这是我的代码:

public void showHighscore() {
    Games.Leaderboards.submitScore(mHelper_.getApiClient(),
            getString(R.string.leaderboard_highscore), this.getIntent()
                    .getExtras().getInt("highscore"));

    int REQUEST_LEADERBOARD = 1;// beliebiger int
    startActivityForResult(Games.Leaderboards.getLeaderboardIntent(
            mHelper_.getApiClient(),
            getString(R.string.leaderboard_highscore)), REQUEST_LEADERBOARD);
}

【问题讨论】:

  • 日志中是否有崩溃或错误?
  • 我在这里发布了一个很长的答案..stackoverflow.com/a/24214612/3733450
  • 该链接与 Android 2.2 无关,因为它在问题中明确说明。

标签: android google-play-services android-2.2-froyo


【解决方案1】:

截至Google Play Services 4.0,Google Play 服务的最低 API 版本为 Android 2.3 (Gingerbread)。

您可以改用 SDK 管理器中的“Google Play services for Froyo”和reference Google Play Services version 3.2.65(Froyo 的最后一个可用),但显然无法访问任何新的 API。

【讨论】:

  • Froyo 的 Google Play 服务是否允许您访问 google plus 排行榜系统?很难找到相关信息和文档。
  • 对 Froyo 的支持已被弃用超过 6 个月,因此查找文档或示例将非常困难。 Google Play 游戏和排行榜确实在 Google Play 服务 4.0 之前出现,因此它们可供 Froyo 用户使用。但请注意,当前基于 GoogleApiClient 的模型(提供更可靠的连接体验和用于访问多个 Google 服务的新 API)只是最近才推出,不适用于 Froyo。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-10-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多