Right now we are distributing our Android app through apks stored on our server. We had the idea of saving all released apks so that if we put out a new update and then realize there's a major problem, we can switch back to the previous apk version. Quick and easy.
For example
Release 1: Version Name = 1.0.0 and Version Code = 1
Release 2: Version Name = 1.0.1 and Version Code = 2
Say there's a problem with release 2 and it's better to revert back to release 1 instead of waiting for 1.0.2
. The problem is, when the user downloads and installs that older apk, it wont install due to the version code being lower.
Is there a better way to handle this than going back to previous versions tag in our svn, re-publishing the application with a higher version code, uploading it to our server, then reverting the apps back using that "new" apk?
This is what version control is for. I'd take a good look at Git and its branching and tagging features as well as its revert and rollback commands.
Key thing to remember: History is immutable.
If you screw up, revert the commits (or better yet - fix them if you can) and then publish a new version.