Package com.luna.common.os
Enum Class OperatingSystem
- All Implemented Interfaces:
Serializable
,Comparable<OperatingSystem>
,java.lang.constant.Constable
Enum constants for most common operating systems.
- Author:
- harald
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionGeneric Android mobile device without OS version number informationGeneric Android tablet device without OS version number informationBada is a mobile operating system being developed by Samsung Electronics.BlackBerryOS.Chrome OS by Google, mostly used on Chromebooks and ChromeboxesGoogle TV uses Android 2.x or 3.x but doesn't identify itself as Android.iOS4, with the release of the iPhone 4, Apple renamed the OS to iOS.Various Linux based operating systems.Older Mac OS systems before Mac OS XLinux based Maemo software platform by Nokia.Proxy server that hides the original user-agent.Nokia's Series 40 operating system.Proprietary operating system used for many Sony Ericsson phones.Other Symbian OS versionsSymbian OS 6.x versions.Symbian OS 7.x versions.Symbian OS 8.x versions.Symbian OS 9.x versions.Tizen is a Linux Foundation project.PalmOS, exact version unkownNintendo Wii game console.Windows Mobile / Windows CE. -
Method Summary
Modifier and TypeMethodDescriptiongetGroup()
short
getId()
Returns the manufacturer of the operating systemgetName()
boolean
isInUserAgentString
(String agentString) Checks if the given user-agent string matches to the operating system.boolean
Deprecated.static OperatingSystem
parseUserAgentLowercaseString
(String agentString) static OperatingSystem
parseUserAgentString
(String agentString) Parses user agent string and returns the best match.static OperatingSystem
parseUserAgentString
(String agentString, List<OperatingSystem> operatingSystems) Parses the user agent string and returns the best match for the given operating systems.static OperatingSystem
valueOf
(short id) Returns the enum constant of this type with the specified id.static OperatingSystem
Returns the enum constant of this class with the specified name.static OperatingSystem[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WINDOWS
Windows Mobile / Windows CE. Exact version unknown. -
WINDOWS_10
-
WINDOWS_81
-
WINDOWS_8
-
WINDOWS_7
-
WINDOWS_VISTA
-
WINDOWS_2000
-
WINDOWS_XP
-
WINDOWS_10_MOBILE
-
WINDOWS_PHONE8_1
-
WINDOWS_PHONE8
-
WINDOWS_MOBILE7
-
WINDOWS_MOBILE
-
WINDOWS_98
-
XBOX_OS
-
ANDROID
-
ANDROID8
-
ANDROID8_TABLET
-
ANDROID7
-
ANDROID7_TABLET
-
ANDROID6
-
ANDROID6_TABLET
-
ANDROID5
-
ANDROID5_TABLET
-
ANDROID4
-
ANDROID4_TABLET
-
ANDROID4_WEARABLE
-
ANDROID3_TABLET
-
ANDROID2
-
ANDROID2_TABLET
-
ANDROID1
-
ANDROID_MOBILE
Generic Android mobile device without OS version number information -
ANDROID_TABLET
Generic Android tablet device without OS version number information -
CHROME_OS
Chrome OS by Google, mostly used on Chromebooks and Chromeboxes -
WEBOS
PalmOS, exact version unkown -
PALM
-
MEEGO
-
IOS
iOS4, with the release of the iPhone 4, Apple renamed the OS to iOS. -
iOS11_IPHONE
-
iOS10_IPHONE
-
iOS9_IPHONE
-
iOS8_4_IPHONE
-
iOS8_3_IPHONE
-
iOS8_2_IPHONE
-
iOS8_1_IPHONE
-
iOS8_IPHONE
-
iOS7_IPHONE
-
iOS6_IPHONE
-
iOS5_IPHONE
-
iOS4_IPHONE
-
MAC_OS_X_IPAD
-
iOS11_IPAD
-
iOS10_IPAD
-
iOS9_IPAD
-
iOS8_4_IPAD
-
iOS8_3_IPAD
-
iOS8_2_IPAD
-
iOS8_1_IPAD
-
iOS8_IPAD
-
iOS7_IPAD
-
iOS6_IPAD
-
MAC_OS_X_IPHONE
-
MAC_OS_X_IPOD
-
MAC_OS_X
-
MAC_OS
Older Mac OS systems before Mac OS X -
MAEMO
Linux based Maemo software platform by Nokia. Used in the N900 phone. http://maemo.nokia.com/ -
BADA
Bada is a mobile operating system being developed by Samsung Electronics. -
GOOGLE_TV
Google TV uses Android 2.x or 3.x but doesn't identify itself as Android. -
TIZEN
Tizen is a Linux Foundation project. Mostly used by various Samsung devices.- See Also:
-
- Tizen Browser user-agent format
- Samsung Internet User-Agent String Format Not specified how devices like car display or a fridge would identify themselves.
-
TIZEN3
-
TIZEN3_MOBILE
-
TIZEN3_TV
-
TIZEN2
-
TIZEN2_MOBILE
-
TIZEN2_TV
-
TIZEN_MOBILE
-
KINDLE
Various Linux based operating systems. -
KINDLE3
-
KINDLE2
-
LINUX
-
UBUNTU
-
UBUNTU_TOUCH_MOBILE
-
LINUX_SMART_TV
-
SYMBIAN
Other Symbian OS versions -
SYMBIAN9
Symbian OS 9.x versions. Being used by Nokia (N71, N73, N81, N82, N91, N92, N95, ...) -
SYMBIAN8
Symbian OS 8.x versions. Being used by Nokia (6630, 6680, 6681, 6682, N70, N72, N90). -
SYMBIAN7
Symbian OS 7.x versions. Being used by Nokia (3230, 6260, 6600, 6620, 6670, 7610), Panasonic (X700, X800), Samsung (SGH-D720, SGH-D730) and Lenovo (P930). -
SYMBIAN6
Symbian OS 6.x versions. -
SERIES40
Nokia's Series 40 operating system. Series 60 (S60) uses the Symbian OS. -
SONY_ERICSSON
Proprietary operating system used for many Sony Ericsson phones. -
SUN_OS
-
PSP
-
WII
Nintendo Wii game console. -
BLACKBERRY
BlackBerryOS. The BlackBerryOS exists in different version. How relevant those versions are, is not clear. -
BLACKBERRY7
-
BLACKBERRY6
-
BLACKBERRY_TABLET
-
ROKU
-
PROXY
Proxy server that hides the original user-agent. ggpht.com = Gmail proxy server -
UNKNOWN_MOBILE
-
UNKNOWN_TABLET
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
parseUserAgentString
Parses user agent string and returns the best match. Returns OperatingSystem.UNKNOWN if there is no match.- Parameters:
agentString
- User-agent string as provided in the request.- Returns:
- OperatingSystem enum
-
parseUserAgentLowercaseString
-
parseUserAgentString
public static OperatingSystem parseUserAgentString(String agentString, List<OperatingSystem> operatingSystems) Parses the user agent string and returns the best match for the given operating systems. Returns OperatingSystem.UNKNOWN if there is no match. Be aware that if the order of the provided operating systems is incorrect or the set is too limited it can lead to false matches!- Parameters:
agentString
- User-agent string as provided in the request.- Returns:
- OperatingSystem enum
-
valueOf
Returns the enum constant of this type with the specified id. Throws IllegalArgumentException if the value does not exist.- Parameters:
id
- Id value of the operating system.- Returns:
- OperatingSystem enum
-
getId
public short getId() -
getName
-
isMobileDevice
Deprecated. -
getDeviceType
-
getGroup
-
getManufacturer
Returns the manufacturer of the operating system- Returns:
- the manufacturer
-
isInUserAgentString
Checks if the given user-agent string matches to the operating system. Only checks for one specific operating system.- Parameters:
agentString
- User-agent string as provided in the request.- Returns:
- boolean
-