Last active
December 18, 2015 04:39
-
-
Save sunwicked/5727271 to your computer and use it in GitHub Desktop.
Finding out an Android apk's details: package name, version code, version name .. etc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Used to find details of an apk file placed on the | |
* device, requirements are location of the file. | |
* PackageInfo gives details like package name, version code, version name .. etc | |
**/ | |
String srcApk = Environment.getExternalStorageDirectory()+"/your.apk"; | |
PackageInfo pf = getPackageManager().getPackageArchiveInfo(srcApk, PackageManager.GET_META_DATA); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment