I have android app published in google play with the following version:
android:versionCode="1"
android:versionName="1.0"
I think that's the default version when creating android app in Eclipse IDE. I made minor changes in my app. I want to publish the updated app. What is the recommended versionCode and versionName for the updated app?
What I want is that users who already installed the app will be notified by google play that a new version is available. Im new to android development. In my device, I received notification for my installed app that there are new version available. I want this functionality.
I'm thinking of having:
android:versionCode="2"
android:versionName="1.0.1"
Is that OK?
thanks
Yes thats perfect.
Typically, you would release the first version of your application
with versionCode set to 1, then monotonically increase the value with
each release, regardless whether the release constitutes a major or
minor release. This means that the android:versionCode value does not
necessarily have a strong resemblance to the application release
version that is visible to the user (see android:versionName, below).
Applications and publishing services should not display this version
value to users.
As with android:versionCode, the system does not use this value for
any internal purpose, other than to enable applications to display it
to users. Publishing services may also extract the android:versionName
value for display to users.
Ref : Versioning Your Applications and versionCode vs versionName in Android Manifest
Yes that's correct.
The versionCode needs to increment but the versionName can be any string to be shown to your users.
See docs for fuller explanation: http://developer.android.com/tools/publishing/versioning.html
Related
I wish to release a new app as public beta for Android and production for iOS. I wish to have the same version numbers for both. But, iOS doesn't allow version less than 1.0.0 for production, correct me if I am wrong.
So can I use version 1.x.x for an android public beta app?
Is there any restrictions in Google play to use appropriate version numbers?
You can use whatever versionName you want. The only thing that matters is the versionCodes have to increment. You can't upload a new APK with a matching or lower version code.
The versionName has no purpose other than to be displayed to users.
https://developer.android.com/studio/publish/versioning.html
On gradle you set "versionCode" with an integer, this integer must be necessarily superior to the previous version. check play console for help about alpha-beta versionCode hierarchies.
on the same gradle you set "versionName" string, the info that your apps users will see, this is a free textfield, you can use "1.x.x" or "1.xx.xx_beta"
productFlavors allows free texfields too
check the "app info" about apps instaled on your device and compare styles
I read that if we want to update an app in google play, the version Code should be higher than the previous apk file. I've an app with version code: 20 and version name 1.0. So to update the app, how should I increase the version code? Should it increase by 10? or just 1 is enough? ie, version code from 20 to 30 or version code from 20 to 21?
VersionCode
This number is used only to determine whether one version is more
recent than another, with higher numbers indicating more recent
versions. Typically, you would release the first version of your app
with versionCode set to 1, then monotonically increase the value with
each release, regardless whether the release constitutes a major or
minor release. This means that the versionCode value does not
necessarily have a strong resemblance to the app release version that
is visible to the user (see versionName, below). Apps and publishing
services should not display this version value to users.
defaultConfig
{
minSdkVersion 17
targetSdkVersion 23
versionCode 1 // Default , You can increase 1 when update .
versionName "1.0"
}
You can use the Play Core Library In-app updates to tackle this. You can check for update availability and install them if available seamlessly.
In-app updates are not compatible with apps that use APK expansion files (.obb files). You can either go for flexible downloads or immediate updates which Google Play takes care of downloading and installing the update for you.
dependencies {
implementation 'com.google.android.play:core:1.5.0'
...
}
Note that, In-app updates works only with devices running Android 5.0 (API level 21) or higher, and requires you to use Play Core library 1.5.0 or higher.
'
I hope this will help somebody
I increased it from code 1 and version 1.0 to code 2 and version 1.1 . That's also what it says in my developer console. So just do as you wish
Basically, For update your apk you should update version code to 21(just 1 increase) and your version name.
According to the official documentation (Versioning your applications), the "android:versionCode" must be increased with every release of an Android application.
For release versions supposed to be uploaded to Google Play, I understand why this is necessary. However, what about nightly builds, mainly aimed at developers? For these, the versionCode would need to be generated, which is not straightforward (SCM like Git without numeric commit id, possibly multiple builds from the same commit etc.).
So, my question:
Can I just use a constant versionCode for nightly builds? What consequences will this have (apart from not being able to upload to Google Play)?
Can I just use a constant versionCode for nightly builds?
Sure. That's what happens every time you run your app from your IDE, after all, unless you have scripted something (e.g., in Gradle) yourself to generate a unique versionCode.
What consequences will this have (apart from not being able to upload to Google Play)?
Nothing that's any different from doing builds in the IDE, other than things that are more tied to doing centralized builds, more so than versionCode (e.g., certificate mismatch errors, unless everyone and the CI server are synchronized to use the same debug keystore).
VersionCode is used to upgrade your apps, if you are using the same versionCode in your ease release, it will oveeride your apk file and don't able to install your new release file in which you have made some changes in it
In android you have versionCode and versionName by default. versionCode is an integer that is used by Google Play Store to make sure that you are uploading a new version of the app
For e.g. If you are releasing your fisrt app to playstore, your versionCode is android:versionCode="1" and if you're releasing your second version, your android:versionCode="2", so it will always increasing.
In build.gradle file, there is an attribute called versionCode. Whenever I make an update to the project, should I increase the value of versionCode?
android:versionCode —
An integer value that represents the version of the application code,
relative to other versions.
Typically, you would release the first version of your application
with versionCode set to 1, then monotonically increase the value with
each release, regardless whether the release constitutes a major or
minor release. This means that the android:versionCode value does
not necessarily have a strong resemblance to the application release
version that is visible to the user. Applications and publishing
services should not display this version value to users.
Screenshot of versionCode at Play Store Developer Console:
android:versionName —
A string value that represents the release version of the application
code, as it should be shown to users.
Screenshot of versionName in Already Published app at Play Store:
Summary: Version code is for keeping track of your application update, which is basically used when you upload a new apk in the Play Store. On the other hand versionName is a String that is visible to user so that they can see there's a new version available.
Source: Versioning Your Applications
You should increase the versionCode for any new version you plan to release on Google Play (or whatever other distribution channels you use) as an update to the existing version. For internal testing, you don't have to increment the versionCode since you can force a reinstall.
If u plan on publishing your app to playstore then each update must have different verionCode and versionName is simply for developers to keep track of major changes and updates.
You need to increase the value of version code only when you are publishing the app otherwise there is no need to increase it. You can continue with the same version code
I have made an android app. I want to upload it on android market. I later want to make updates too. So what necassary stepts should i take so that it automatically detects the android new version and download and install them
I have tried googling but no exact tutorial have been found.
In coding what links should I put and stuff like that.
Best Regards
-Set this line to your manifest:
<manifest android:versionCode="1" android:versionName="1">
-Increase the versionCode for each new version and update
-do NOT change the packagename of the app
-use the update functionality in your google play account
when you upload new version app, upgrade its versionCode and versionName in Manifest.xml. Market will handle it automatically by reading the versionCode and notify user's device to upgrade if possible. Ensure that the new versionCode value must be bigger than the old one.
You only need to update your manifest file, by changing the version code
<manifest android:versionName="1.6"
android:versionCode="7"
If the version code has not increased, google will not let you upload the new version.
Once released, the user's google play account will detect new version, and if they have selected automatic update for the App, it will install for them.
If not then it will notify them of available update when they are next in their
'My Apps' section of google play.
Hope this helps