Should I check android.os.Build.PRODUCT or android.os.Build.DEVICE for a particular value? Will this value be the same on all firmware versions?
Or is there some other way?

- 577
- 1
- 7
- 17
-
what you want `device model or device manufacturer name?` – Samir Mangroliya Apr 07 '12 at 09:19
-
Model. I want to know if the device is "Sony Xperia Play" (with gamepad). – dop2000 Apr 07 '12 at 09:22
-
http://developer.android.com/reference/android/os/Build.html – Samir Mangroliya Apr 07 '12 at 09:27
-
There is no answer on that page. What particular value should I look for? Is it "Sony Xperia Play"? Is it "Xperia Play"? Is it some code like "R800a"? – dop2000 Apr 07 '12 at 09:35
-
This may help you http://stackoverflow.com/questions/1995439/get-android-phone-model-programmatically – Aamirkhan Apr 07 '12 at 09:45
-
I'm looking for the value, I know how to get it... – dop2000 Apr 07 '12 at 09:48
3 Answers
Here are all the model names of Xperia PLAY in the world.
Xperia™ PLAY (R800) R800i,R800a, R800x, R800at, Z1i, SO-01D
Depending on what you want to do, there are other ways to detect if it's an Xperia PLAY.
If you want you application to only work on Xperia PLAY, try using Google PLAY(previously Android Market) Developer Console to limit your application to Xperia PLAY.
If you just want to remove controls from the screen when the device is Xperia PLAy, try detecting when the gamepad is opened.
In case you want to do some navigation or other stuff using DPAD, try detecting if the device has a DPAD.

- 497
- 3
- 11
check android.os.Build.DEVICE
. if it was equal to zeus
, that means that the device which your app is running is Xperia Play.
like this:
boolean isXperiaPlay = android.os.Build.DEVICE.equalsIgnoreCase("zeus");
for more info: each android phone has a codename, for example, codename of the nexus s
is crespo
and codename of the nexus one
is passion
. this value for Xperia Play
is Zeus
.

- 2,817
- 1
- 28
- 47
-
Thanks! But I think the value of android.os.Build.DEVICE depends on firmware. I asked a user with Xperia Play to test my app and on his phone android.os.Build.DEVICE returned "R800i". Of course I can check for strings "R800*", "R88*" and "zeus", but I'm afraid there might be other values... – dop2000 Apr 08 '12 at 06:14
try
String PhoneModel = android.os.Build.MODEL
for example, on my sony LT26i, it shows "LT26i"