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
}
I tested this code in an emulator but it doesn't work. How can I make it work?