Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

try

String PhoneModel = android.os.Build.MODEL

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top