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
  • 8,842
  • 13
  • 79
  • 133

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
  • 8,842
  • 13
  • 79
  • 133
Rushabh Patel
  • 3,015
  • 4
  • 24
  • 57
0

Have a look at the constants in Build class.

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

etc.

Community
  • 1
  • 1
S.D.
  • 28,125
  • 2
  • 75
  • 122
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,520
  • 7
  • 50
  • 79