How do I retrieve versionCode and versionName from an APK?

1

In a given case, a certain company does not want their app to be released on Google Play. However, the idea would be to create a version control within that company's own system to upload the .apk and write some basic information to a database table. This information would be an id, versionCode , versionName , address URL saved from .apk , and date of submission.

I would like to extract only versionCode and versionName from apk at the time of uploading, so you do not have to type this manually at the time of the version registration.

How can I redeem versionCode and versionName from an APK?

    
asked by anonymous 30.09.2017 / 19:43

1 answer

0

I had to solve this same situation recently. If, like in my case, your apk is on a server with PHP support, you can use the PHP APK PARSER to extract AndroidManifest.xml and PHP's native class XMLReader to get versionCode and versionName .

    
18.02.2018 / 16:40