开发者

Check if an app already exists in Android market via API

This Android market API has a method isInMarket(). Can开发者_StackOverflow社区 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
}

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


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.

Here is a link on how to install market onto the emulator

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜