开发者

Check if an app already exists in Android market via API

开发者 https://www.devze.com 2023-02-28 04:45 出处:网络
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?

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

精彩评论

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