【发布时间】: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