检查一个应用程序通过API已经存在于Android的市场 [英] Check if an app already exists in Android market via API

查看:124
本文介绍了检查一个应用程序通过API已经存在于Android的市场的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个Android市场上的API有一个方法 isInMarket()。我可以用这个方法来检查,如果一个应用程序已经存在于Android市场?

This Android market API has a method isInMarket(). Can I use this method to check if an app already exists in the Android market?

AppInfo mAppInfo = new AppInfo("packagename.example");
if (!mAppInfo.isInMarket()) {
    //app non-exist in the android market
} 
else {
    //app exist in the android market
}

我测试了这code在模拟器,但它不工作。我怎样才能使它工作?

I tested this code in an emulator but it doesn't work. How can I make it work?

推荐答案

Android模拟器没有安装它,因此框架不会工作的市场应用。该网络的Andr​​oid市场-API要求您已经安装了Android Market的应用程序。

The android emulator does not have the market app installed in it so the framework wont work. The web-android-market-api requires that you have the android market app installed.

下面是如何链接安装市场在仿真器上

这篇关于检查一个应用程序通过API已经存在于Android的市场的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆