Reputation: 570
I am developing an application that I need to log to the server the memory location that the application currently resides ie: Internal memory or External storage. Any idea on how to accomplish this?
Upvotes: 1
Views: 347
Reputation: 2609
Use the following code to get your application's APK directory-
ApplicationInfo appInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(), 0);
String installDir =appInfo.sourceDir;
Upvotes: 1