IntelliJ Java IDE
The moose likes Android and the fly likes Check if an application is installed Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "Check if an application is installed" Watch "Check if an application is installed" New topic
Author

Check if an application is installed

Eli Zuckerman
Greenhorn

Joined: Apr 19, 2010
Posts: 4
How can I check if an app was installed on a device before trying to access it from another app? Is there any sort of checkApplicationManager method I can call?
Thank you.
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1365

PackageManager is the class that you can use to get a list of all the installed packages.
Check this snippet out: it does the same

Maybe that can help.


[List of FAQs] | [Android FAQ] | [My Blog] | [Samuh Varta]
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1365

Alternatively, you can also create an Intent object with appropriate Component info and then check if the Intent is callable or not using the following function:
Eli Zuckerman
Greenhorn

Joined: Apr 19, 2010
Posts: 4
Thanks. I'll try this out today
martijn van gils
Greenhorn

Joined: Dec 16, 2011
Posts: 2
Hi guys

I'm having the same problem as Eli,

but due to my lack of programming knowledge i don't know how to use it. If i want to check for the zxing Barcode scanner.

I tried some code but it doesn't really do anything.



i the toasts will be replaced with a popup that points the user to the market if the scanner is not allready installed.

thank you for your help beforehand.

martijn van gils
Greenhorn

Joined: Dec 16, 2011
Posts: 2
thanks guys with this code i finally got it to work.
just needed to keep hacking away at it :P

thanks anyway
 
 
subject: Check if an application is installed
 
Threads others viewed
What to extract JWebPlus ?
Change JVM locale before Start up
Application open slow
How to open files in Unix ?
jsp postgress connection
developer file tools