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,153
  • 15
  • 80
  • 142

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,153
  • 15
  • 80
  • 142
Rushabh Patel
  • 3,049
  • 4
  • 25
  • 58
0

Have a look at the constants in Build class.

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

etc.

Community
  • 1
  • 1
S.D.
  • 28,804
  • 3
  • 80
  • 126
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,730
  • 7
  • 51
  • 79