How can I get programmatically get the version code or version name of my apk from the AndroidManifest.xml file after downloading it and without installing it.
Following worked for me from the command line:
aapt dump badging myapp.apk
NOTE: aapt.exe is found in a build-tools sub-folder of SDK. For example:
build-tools
/build-tools/23.0.2/aapt.exe