1

How do you know the phone on which the application is running? How do you know the version of the application that the user is using? Documenting the net I found that to know the version of the app you have to read the AndroidManifest.xml but. How do you?

Siddharth
  • 9,349
  • 16
  • 86
  • 148

3 Answers3

2

Try this out from the Build class

String myDeviceModel = android.os.Build.MODEL;
String myDeviceDevice = android.os.Build.DEVICE;
String myDeviceVersion = android.os.Build.VERSION;
String myDeviceProduct = android.os.Build.PRODUCT;

For more detail use this link Build

Siddharth
  • 9,349
  • 16
  • 86
  • 148
Rushabh Patel
  • 3,052
  • 4
  • 26
  • 58
0

Have a look at the constants in Build class.

  • Build.MANUFACTURER
  • Build.MODEL
  • Build.PRODUCT

etc.

Community
  • 1
  • 1
S.D.
  • 29,290
  • 3
  • 79
  • 130
0

You can get it as follows:

String manufacturer = Build.MANUFACTURER;
String model = Build.MODEL;

Manufacturer will you name of vendor n Model will give model number.

Usama Sarwar
  • 8,922
  • 7
  • 54
  • 80