I write code for finding the Android version like this
String version=Build.VERSION.RELEASE;
by using this code I am get the version number but I want version name.
how to get the version name?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As suggested earlier, reflection seems to be the key to this question. The StringBuilder and extra formatting is not required, it was added only to illustrate usage.
On my 4.1 emulator, I get this output:
Enjoy!