com.holonplatform.vaadin7.device

## Interface UserAgentInspector

- All Superinterfaces:
    Serializable
  All Known Subinterfaces:
    DeviceInfo

      public interface UserAgentInspector
      extends Serializable

  Interface to obtain client device and environment informations using browser provided `user-agent` and `accept` request headers.
  Since:
    5.0.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static UserAgentInspector` | `create(String userAgentHeader, String httpAcceptHeader)` Build a UserAgentInspector instance using given header values
    `static UserAgentInspector` | `create(com.vaadin.server.VaadinRequest request)` Build a UserAgentInspector instance using a `VaadinRequest`
    `String` | `getAcceptHeader()` Return the Accept header
    `String` | `getUserAgentHeader()` Return the User-Agent header
    `boolean` | `isAndroid()` Android check
    `boolean` | `isAndroidPhone()` Android phone check
    `boolean` | `isAndroidTablet()` Android tablet check
    `boolean` | `isGameConsole()` Game console check
    `boolean` | `isIOs()` iOS check
    `boolean` | `isIPad()` iPad check
    `boolean` | `isIPhone()` iPhone check
    `boolean` | `isIPod()` iPod check
    `boolean` | `isKindle()` Kindle check
    `boolean` | `isMobile()` Mobile device check
    `boolean` | `isNintendo()` Nintendo check
    `boolean` | `isPlaystation()` PlayStation check
    `boolean` | `isSmartphone()` Smartphone check
    `boolean` | `isTablet()` Tablet check
    `boolean` | `isWebKit()` WebKit check
    `boolean` | `isWindowsPhone()` Windows phone check
    `boolean` | `isXbox()` Xbox check

- - ### Method Detail

    - #### getUserAgentHeader

          String getUserAgentHeader()

      Return the User-Agent header
      Returns:
        User-agent header in lower case

    - #### getAcceptHeader

          String getAcceptHeader()

      Return the Accept header
      Returns:
        Accept header in lower case

    - #### isWebKit

          boolean isWebKit()

      WebKit check
      Returns:
        whether the current browser is based on WebKit

    - #### isIPhone

          boolean isIPhone()

      iPhone check
      Returns:
        whether the device is an iPhone

    - #### isIPad

          boolean isIPad()

      iPad check
      Returns:
        whether the device is an iPad

    - #### isIPod

          boolean isIPod()

      iPod check
      Returns:
        whether the device is an iPod touch

    - #### isIOs

          boolean isIOs()

      iOS check
      Returns:
        whether the device is an iOS device

    - #### isAndroid

          boolean isAndroid()

      Android check
      Returns:
        whether the device is an Android device

    - #### isAndroidPhone

          boolean isAndroidPhone()

      Android phone check
      Returns:
        whether the device is an Android phone

    - #### isAndroidTablet

          boolean isAndroidTablet()

      Android tablet check
      Returns:
        whether the device is an Android tablet

    - #### isWindowsPhone

          boolean isWindowsPhone()

      Windows phone check
      Returns:
        whether the device is a Windows phone

    - #### isKindle

          boolean isKindle()

      Kindle check
      Returns:
        whether the device is a Kindle

    - #### isPlaystation

          boolean isPlaystation()

      PlayStation check
      Returns:
        whether the device is a PlayStation

    - #### isNintendo

          boolean isNintendo()

      Nintendo check
      Returns:
        whether the device is a Nintendo

    - #### isXbox

          boolean isXbox()

      Xbox check
      Returns:
        whether the device is a Xbox

    - #### isGameConsole

          boolean isGameConsole()

      Game console check
      Returns:
        whether the device is a game console

    - #### isSmartphone

          boolean isSmartphone()

      Smartphone check
      Returns:
        whether the device is a Smartphone

    - #### isTablet

          boolean isTablet()

      Tablet check
      Returns:
        whether the device is a Tablet

    - #### isMobile

          boolean isMobile()

      Mobile device check
      Returns:
        whether the device is a mobile device

    - #### create

          static UserAgentInspector create(String userAgentHeader,
                                           String httpAcceptHeader)

      Build a UserAgentInspector instance using given header values
      Parameters:
        `userAgentHeader` - the User-Agent header
        `httpAcceptHeader` - the Accept header
      Returns:
        The `UserAgentInspector`

    - #### create

          static UserAgentInspector create(com.vaadin.server.VaadinRequest request)

      Build a UserAgentInspector instance using a `VaadinRequest`
      Parameters:
        `request` - Vaadin request
      Returns:
        The `UserAgentInspector`

Copyright © 2019 The Holon Platform. All rights reserved.