This file appears to be in a binary XML format. What is this format and how can it be parsed programmatically (as opposed to using the aapt dump tool in the SDK)?
it can be helpful
public static int vCodeApk(String path) {
PackageManager pm = G.context.getPackageManager();
PackageInfo info = pm.getPackageArchiveInfo(path, 0);
return info.versionCode;
// Toast.makeText(this, "VersionCode : " + info.versionCode + ", VersionName : " + info.versionName, Toast.LENGTH_LONG).show();
}
G is my Application class :
public class G extends Application {