public final class DeviceUtils extends Object
isTablet(Context).| Modifier and Type | Field and Description |
|---|---|
static int |
PHABLET
Identifier for PHABLET type of Android powered device.
|
static int |
PHONE
Identifier for PHONE type of Android powered device.
|
static int |
TABLET
Identifier for TABLET type of Android powered device.
|
static int |
TELEVISION
Identifier for TELEVISION type of Android powered device.
|
static int |
UNKNOWN
Identifier for UNKNOWN type of Android powered device.
|
static int |
WEARABLE
Identifier for WEARABLE type of Android powered device.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isTablet(android.content.Context context)
Checks whether the current Android device matches tablet specifications or not.
|
public static final int UNKNOWN
Constant value: 0
public static final int PHONE
Constant value: 1
public static final int PHABLET
Constant value: 2
public static final int TABLET
Constant value: 3
public static final int TELEVISION
Constant value: 4
public static final int WEARABLE
Constant value: 5
public static boolean isTablet(android.content.Context context)
Note, that this information is only approximate and shouldn't be used for core logic of any application.
True if the current Android device matches tablet specifications, false
otherwise.