Checking my app version programmatically in Android market(在 Android 市场中以编程方式检查我的应用程序版本)
问题描述
目前我正在检查应用程序版本代码,并将其与我服务器上的最新版本代码匹配,并根据此匹配发送用户从 Android 市场获取最新更新.
Currently I'm checking the app version code on launch and match it with latest version code on my server and based on this matching I send user to get latest update from Android market.
它运行良好,但我的问题是我必须手动更改服务器上的最新版本代码,而且我不知道新版本的 APK
何时在市场上激活.
It's working well but my problem is that I have to manually change the latest version code on my server and I don't know exactly when new version of APK
gets activated in market.
有什么方法可以直接在安卓市场中查看应用的版本代码,这样当新的apk被激活时,我可以直接将用户发送到市场?
Is there any way to check version code of app in Android market directly so that I can send user directly to market when new apk gets activated?
推荐答案
Google Play 不提供任何用于检索元数据的官方 API.但是,您可以在 http://code.google.com/p/android-market- 查看非官方 APIapi/.
Google Play does not provide any official APIs for retrieving metadata. You could however, check the unofficial API at http://code.google.com/p/android-market-api/.
具体来说,请查看 Wiki 页面 HowToSearchApps.查询的响应包含版本信息:
Specifically, take a look at the Wiki page HowToSearchApps. The response to the query contains version information:
{
"app": [
{
"rating": "4.642857142857143",
"title": "Ruboto IRB",
"ratingsCount": 14,
"creator": "Jan Berkel",
"appType": "APPLICATION",
"id": "9089465703133677000",
"packageName": "org.jruby.ruboto.irb",
"version": "0.1",
"versionCode": 1,
"creatorId": ""Jan Berkel"",
"ExtendedInfo": {
"category": "Tools",
"permissionId": [
...
这篇关于在 Android 市场中以编程方式检查我的应用程序版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!