Reputation: 29
In my application i need to check if on my devices is present "Amazon Appstore". How can I do this? Guide Me. I have no idea. Thanks.
Upvotes: 0
Views: 77
Reputation: 118
Just get the package name and use package manager to get all the apps instead and check one by one with the package name you have. You can get package name from the google play link of the app you need.
Upvotes: 1
Reputation: 5904
Try to see here if could helps you: http://www.coderzheaven.com/2012/03/28/how-to-check-whether-an-application-is-installed-in-your-android-phone-2/
Upvotes: 0
Reputation: 2266
Try this
private boolean isAppInstalled(String packageName) {
PackageManager packageManager = getPackageManager();
boolean installed = false;
try {
packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES);
installed = true;
} catch (PackageManager.NameNotFoundException e) {
installed = false;
}
return installed;
}
Upvotes: 1