【问题标题】:Getting latest App version from Google PlayStore in case of mutiple apk's uploaded在上传多个 apk 的情况下从 Google PlayStore 获取最新的应用程序版本
【发布时间】:2017-07-20 19:36:52
【问题描述】:

我已在 Playstore 上为我的应用上传了多个 APK,以便在所有设备上支持它。

现在的问题是,当我使用以下代码获取我的 Playstore 版本时,它会返回“随设备而异”。

字符串 playStoreUrl = "http://play.google.com/store/apps/details?id=" + mContext.getPackageName();

            //It retrieves the latest version by scraping the content of current version from play store at runtime
            Document doc = Jsoup.connect(String.valueOf(playStoreUrl)).get();
            mAppStoreVersion = doc.getElementsByAttributeValue
                    ("itemprop","softwareVersion").first().text();

mAppStoreVersion 是“因设备而异”。有没有其他方法可以从 Playstore 获取最新的应用版本?

【问题讨论】:

  • 每个 APK 有什么区别?它们是否仅因它们支持的 API 级别而异?还是还有其他区别?
  • 还有其他区别。我使用本机库,因此变体也基于 CPU 架构(armabi、x86 等)。我为每种 CPU 架构发布了不同的 APK,因为它有助于显着减小应用程序的大小。
  • @Pareek 您发现如何进行的任何更改。

标签: java android google-play-services


【解决方案1】:

关于版本为“因设备而异”,您可以查看您的 Google Play Publisher 帐户。 Google Play 允许您为您的应用程序发布不同的 APK。每一个都针对不同的设备配置。因此,每个 APK 都是您的应用程序的一个独立版本,但它们在 Google Play 上共享相同的应用程序列表,并且必须共享相同的包名称并使用相同的发布密钥进行签名。

更多详情可以查看官方Google documentation for Multiple APK Support

【讨论】:

  • 我已经发布了多个 APK。我的问题是,我可以为 API 级别大于 x 的设备发布我的 apk 的 App 版本吗?
  • 这不是问题,我们想知道如何独立从商店获取它。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-10-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-10
  • 1970-01-01
  • 2020-07-07
相关资源
最近更新 更多