This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!