Reputation: 3005
I would like to know which one is good when we put the app in google play
In the following statement, whats is the difference between the versionCode and versionName
android:versionCode="1"
android:versionName="1.0"
Thanks In Advance
Upvotes: 3
Views: 15362
Reputation: 34390
I would like to know which one is good when we put the app in google play
It depends on your app requirement.
As i am working on a sleep Cycle app like this. Where we need a service to run all night without stopping. If you put your app on SDCard using preferExternal
. As soon as the user unmount the external storage, the process in which these things run will be terminated.
In this situation I must set android:installLocation="internalOnly"
And when you put your app in external storage
. It will not recieve system broadcast.
Upvotes: 1
Reputation: 131
versionCode — An integer value that represents the version of the application code, relative to other versions. versionName — A string value that represents the release version of the application code, as it should be shown to users.
Upvotes: 1
Reputation: 2192
If you declare "preferExternal", you request that your application be installed on the external storage, but the system does not guarantee that your application will be installed on the external storage. If the external storage is full, the system will install it on the internal storage. The user can also move your application between the two locations.
If you declare "auto", you indicate that your application may be installed on the external storage, but you don't have a preference of install location. The system will decide where to install your application based on several factors. The user can also move your application between the two locations.
android:installLocation="auto"
android:versionCode="5"
android:versionName="0.5.02"
Upvotes: 11
Reputation: 1346
As stated in the Android Api Guide,
Beginning with API Level 8, you can allow your application to be installed on the external storage (for example, the device's SD card). This is an optional feature you can declare for your application with the android:installLocation manifest attribute. If you do not declare this attribute, your application will be installed on the internal storage only and it cannot be moved to the external storage.
I believe It is better to declare android:installLocation
because,
See Android API Guide on App Install Location for more information in this regard.
this will answer your question about android:versionCode
and android:versionName
Hope that helps!!!!!!!!!!
Upvotes: 4