0

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?

dop2000
  • 577
  • 1
  • 7
  • 17

3 Answers3

2

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.

Anup
  • 497
  • 3
  • 11
1

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.

Kayhan Asghari
  • 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
-1

try

String PhoneModel = android.os.Build.MODEL

for example, on my sony LT26i, it shows "LT26i"

Alfred
  • 21,058
  • 61
  • 167
  • 249