public class DeviceMatch extends Object
Constructor and Description |
---|
DeviceMatch() |
Modifier and Type | Method and Description |
---|---|
static boolean |
exists(String match)
Checks if the match string exists.
|
static String |
getDescription(String match)
Gets the device description for a string.
|
static Map<String,String> |
getMap()
Gets the map of devices that can match with this class.
|
static ua_parser.Client |
getParsedUserAgent(EnvProps env)
Gets the parsed user agent instance.
|
static String |
getUserAgent(EnvProps env)
Gets client "User Agent" string.
|
static boolean |
isAndroid(EnvProps env)
Check for Android device (phone or tablet).
|
static boolean |
isBlackberry(EnvProps env)
Check for Blackberry device.
|
static boolean |
isDesktop(EnvProps env)
Check for desktop device.
|
static boolean |
isiOS(EnvProps env)
Check for iOS device (iPhone or iPad).
|
static boolean |
isMac(EnvProps env)
Check for Mac OS device.
|
static boolean |
isWinPhone(EnvProps env)
Check for Windows Phone.
|
static boolean |
match(EnvProps envProps,
String match)
Matches a device.
|
public static boolean match(EnvProps envProps, String match)
envProps
- The Client environment properties.match
- The match string.public static String getDescription(String match)
match
- The match string.public static boolean exists(String match)
match
- The match string.public static Map<String,String> getMap()
public static String getUserAgent(EnvProps env) throws Exception
env
- The environment for a client.Exception
- An exception due to failure in performing the test, with a message why it failed.public static ua_parser.Client getParsedUserAgent(EnvProps env) throws Exception
env
- The environment for a client.Exception
- An exception due to failure in performing the test, with a message why it failed.public static boolean isiOS(EnvProps env) throws Exception
env
- Environment propertiesException
- An exception due to failure in performing the test, with a message why it failed.public static boolean isAndroid(EnvProps env) throws Exception
env
- Environment properties.Exception
- An exception due to failure in performing the test, with a message why it failed.public static boolean isWinPhone(EnvProps env) throws Exception
env
- Environment properties.Exception
- An exception due to failure in performing the test, with a message why it failed.public static boolean isBlackberry(EnvProps env) throws Exception
env
- Environment properties.Exception
- An exception due to failure in performing the test, with a message why it failed.public static boolean isMac(EnvProps env) throws Exception
env
- Environment properties.Exception
- An exception due to failure in performing the test, with a message why it failed.public static boolean isDesktop(EnvProps env) throws Exception
env
- Environment propertiesException
- An exception due to failure in performing the test, with a message why it failed.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.