0

My question is, what accessible values of an application do change when installing debug builds after each other. I can't write into the code and the apk's, I just want to know (through ApplicationInfo, PackageInfo, or anything other), which apk is currently installed.

So the versionCode and versionName properties don't change, but is there something I can query from the package manager, and changes every time?

Daniel Zolnai
  • 16,487
  • 7
  • 59
  • 71
  • An apk is a zip file, and may well have timestamps on its contents. – Chris Stratton Nov 17 '14 at 22:24
  • Indeed, but I can't make a connection between those and the installed versions. – Daniel Zolnai Nov 17 '14 at 22:38
  • Why not? The apk file is in the device, you'd have to look into the most official way of finding it but there are many ways. – Chris Stratton Nov 18 '14 at 01:58
  • The apk's of installed applications are only accessible with root access - which I don't have. Anyways, I don't know anything from the timestamp. The user might install them in a different order, which means the created timestamp may vary. – Daniel Zolnai Nov 18 '14 at 12:28
  • No. Root is not required. And I don't mean the timestamp of the apk, but the timestamps of its still-packed contents. However, if you are now talking about others' apps, note that google play requires a unique version number for each upload it accepts. – Chris Stratton Nov 18 '14 at 13:25
  • It's for an apk management app, where users can install debug apks. The problem is detecting the currently installed version of the app (match to apk). – Daniel Zolnai Nov 18 '14 at 13:46

0 Answers0