检查应用程序在Android市场 [英] Check if app available on Android Market
问题描述
由于Android应用程序的ID /包的名字,我怎么能检查编程如果应用程序可在Android Market上?
Given an Android application's id/package name, how can I check programatically if the application is available on the Android Market?
例如:
com.rovio.angrybirds,其中,作为com.random.app.ibuilt不是
com.rovio.angrybirds is available, where as com.random.app.ibuilt is not
我打算让这个支票无论是从一个Android应用程序或一个Java servlet进行。
I am planning on having this check be performed either from an Android application or from a Java Servlet.
感谢您,
PS:我看了看 HTTP://$c$c.google.com / P / Android的市场API / 的,但我想知道是否有任何简单的方法来检查
PS: I took a look at http://code.google.com/p/android-market-api/ , but I was wondering if there was any simpler way to checking
推荐答案
您可以尝试打开详细信息页的应用程序 - <一个href="https://market.android.com/details?id=com.rovio.angrybirds">https://market.android.com/details?id=com.rovio.angrybirds.
You could try to open the details page for the app - https://market.android.com/details?id=com.rovio.angrybirds.
如果应用程序不存在,你会得到这样的:
If the app doesn't exist, you get this:
这也许并不理想,但你应该能够解析返回的HTML,以确定该应用程序不存在。
It's perhaps not ideal, but you should be able to parse the returned HTML to determine that the app doesn't exist.
这篇关于检查应用程序在Android市场的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!