I was working on my application for android. And as I started it just now i gave the version as Version 0.01. and hard coded it in string.xml which is used in linear layout.
Now my question is: do android provide some method so that instead of hard coding the version no., android provide this. And when I want to update the version it is easily updated. If android does not provide such thing , is there some way through which I save myself from hard coding it.
Thanks in advance.
You can enter the app version number in the android manifest file.
If you want to access the version from inside the code use the following code
To add version number into the manifest use the following