Iam planning to create an app, and not to publish it at the google market.
i want the users to update thire app once in a while when an updates will be rlsd via server(let’s not get into the idea how i gonna do this)… so for this i need to give to each app some ID, so i know that that user gotta update his app, and not new installation (i wanna avoid the case the user will have two versions of the app).. and ofcourse install the app to new users.
how could i sign those apps with version when i rls an update manually?
mybe some other idea?
thanks,
ray.
You can use the
android:versionCodeandandroid:versionNameattributes in the AndroidManifest.xml. That way, as long as the package name is the same it won’t overlap and you can get that info like this to see if there is a newer version available:Then you can read these values and compare with values on your server, like this:
If you’re checking for the version of the same app, you can replace the hard-coded package name with
context.getPackageName().