In my app, I have an email button that uses an intent to open gmail app. How do I access the Android device version and the device model to include it in the body of the email?
Asked
Active
Viewed 945 times
1 Answers
0
For the api info you can use below code.
int currentapiVersion = android.os.Build.VERSION.SDK_INT;
if (currentapiVersion >= android.os.Build.VERSION_CODES.FROYO){
// Do something for froyo and above versions
} else{
// do something for phones running an SDK before froyo
}
and for device maker information use below one
String deviceName = android.os.Build.MODEL;
String deviceMan = android.os.Build.MANUFACTURER;
will find more info on system properties here Official doc - Build