Is there a way for my app to know the android:versionCode from AndroidManifest.xml or do I have to create a separate constant in one of my classes?
Yes, you can access this information via PackageManager.getPackageInfo
Also, see details about versioning in the documentation