Get Android .apk file VersionName or VersionCode WITHOUT installing apk

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.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="xxx.xx.xxx"
    android:versionCode="1"
    android:versionName="1.1" >

For example I want to check if a new version is uploaded on my IIS service, after install it on device, if it is not a new version I don’t want to install it.

11 Answers
11

Leave a Comment