• Post Reply Bookmark Topic Watch Topic
  • New Topic

Any method to know where android app is installed.  RSS feed

 
Hardik Trivedi
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

Lets assume we have and android application and from application I want to know where the application is installed.
Path of the application where it is installed. I mean I need absolute or relative path of the applications's directory.

Is there any method to know this ?
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try calling PackageManager#getApplicationInfo(..). Print the sourceDir property of the returned object.
For details : Read documentations of PackageManager & ApplicationInfo classes.

Hope that helps.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!