Package com.avoka.core.util
Class UserAgentInfo
- java.lang.Object
-
- com.avoka.core.util.UserAgentInfo
-
public class UserAgentInfo extends Object
Create a User Agent Information reporting class.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEVICE_TYPE_DESKTOP
The device type "Desktop"static String
DEVICE_TYPE_DIGITAL_MEDIA_RECEIVER
The device type "Digital Media Rec."static String
DEVICE_TYPE_GAME_CONSOLE
The device type "Game Console"static String
DEVICE_TYPE_PHONE
The device type "Phone"static String
DEVICE_TYPE_TABLET
The device type "Tablet"static String[]
DEVICE_TYPES
The list of device typesstatic String
UNKNOWN
The "Unknown" browser or OS identifier
-
Constructor Summary
Constructors Constructor Description UserAgentInfo(String userAgentValue)
Create a User Agent Information reporting class from the given HTTP user-agent header value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBrowserType()
String
getBrowserVersion()
String
getDeviceType()
String
getOsType()
String
getOsVersion()
boolean
isAndroidOS()
boolean
isAppleiOS()
boolean
isFileUploadSupported()
Checks if is file upload supported.boolean
isInternetExplorer6()
boolean
isInternetExplorer7()
boolean
isWindows8MetroMode()
boolean
isWindowsRTOS()
boolean
isXFASupportedOS()
String
toString()
Return the string representation of this object.
-
-
-
Field Detail
-
UNKNOWN
public static final String UNKNOWN
The "Unknown" browser or OS identifier- See Also:
- Constant Field Values
-
DEVICE_TYPE_DESKTOP
public static final String DEVICE_TYPE_DESKTOP
The device type "Desktop"- See Also:
- Constant Field Values
-
DEVICE_TYPE_DIGITAL_MEDIA_RECEIVER
public static final String DEVICE_TYPE_DIGITAL_MEDIA_RECEIVER
The device type "Digital Media Rec."- See Also:
- Constant Field Values
-
DEVICE_TYPE_GAME_CONSOLE
public static final String DEVICE_TYPE_GAME_CONSOLE
The device type "Game Console"- See Also:
- Constant Field Values
-
DEVICE_TYPE_PHONE
public static final String DEVICE_TYPE_PHONE
The device type "Phone"- See Also:
- Constant Field Values
-
DEVICE_TYPE_TABLET
public static final String DEVICE_TYPE_TABLET
The device type "Tablet"- See Also:
- Constant Field Values
-
DEVICE_TYPES
public static final String[] DEVICE_TYPES
The list of device types
-
-
Constructor Detail
-
UserAgentInfo
public UserAgentInfo(String userAgentValue)
Create a User Agent Information reporting class from the given HTTP user-agent header value.- Parameters:
userAgentValue
- the HTTP user-agent header value.
-
-
Method Detail
-
isInternetExplorer6
public boolean isInternetExplorer6()
- Returns:
- true if the browser type is Internet Explorer 6
-
isInternetExplorer7
public boolean isInternetExplorer7()
- Returns:
- true if the browser type is Internet Explorer 7
-
isAppleiOS
public boolean isAppleiOS()
- Returns:
- true if Apple iOS type device
-
getBrowserType
public String getBrowserType()
- Returns:
- the browserType
-
getBrowserVersion
public String getBrowserVersion()
- Returns:
- the browserVersion
-
getDeviceType
public String getDeviceType()
- Returns:
- the deviceType
-
getOsType
public String getOsType()
- Returns:
- the osType
-
getOsVersion
public String getOsVersion()
- Returns:
- the osVersion
-
isWindows8MetroMode
public boolean isWindows8MetroMode()
- Returns:
- true if the browser is running in Windows 8 Metro UI mode
-
isWindowsRTOS
public boolean isWindowsRTOS()
- Returns:
- true if the browser is running in Windows 8 RT OS
-
isAndroidOS
public boolean isAndroidOS()
- Returns:
- true if the browser is running in Android OS
-
isXFASupportedOS
public boolean isXFASupportedOS()
- Returns:
- true if XFA Reader supported on OS
-
isFileUploadSupported
public boolean isFileUploadSupported()
Checks if is file upload supported.- Returns:
- true, if is file upload supported
-
-