• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Check if an application is installed

 
Eli Zuckerman
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I'll try this out today
 
martijn van gils
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks guys with this code i finally got it to work.
just needed to keep hacking away at it :P

thanks anyway
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic