RichFaces Showcase 4.1.0.20111101-M4

org.richfaces.demo.ui
Class UAgentInfo

java.lang.Object
  extended by org.richfaces.demo.ui.UAgentInfo

public class UAgentInfo
extends Object

The DetectSmartPhone class encapsulates information about a browser's connection to your web site. You can use it to find out whether the browser asking for your site's content is probably running on a mobile device. The methods were written so you can be as granular as you want. For example, enquiring whether it's as specific as an iPod Touch or as general as a smartphone class device. The object's methods return true, or false.


Field Summary
static String deviceAndroid
           
static String deviceArchos
           
static String deviceBB
           
static String deviceBBBold
           
static String deviceBBCurve
           
static String deviceBBPlaybook
           
static String deviceBBStorm
           
static String deviceBBTorch
           
static String deviceBBTour
           
static String deviceBrew
           
static String deviceDanger
           
static String deviceGoogleTV
           
static String deviceHiptop
           
static String deviceIeMob
           
static String deviceIpad
           
static String deviceIphone
           
static String deviceIpod
           
static String deviceKindle
           
static String deviceMacPpc
           
static String deviceMidp
           
static String deviceNintendo
           
static String deviceNintendoDs
           
static String deviceNuvifone
           
static String devicePalm
           
static String devicePda
           
static String devicePlaystation
           
static String devicePpc
           
static String deviceS60
           
static String deviceS70
           
static String deviceS80
           
static String deviceS90
           
static String deviceSymbian
           
static String deviceWebOS
           
static String deviceWii
           
static String deviceWindows
           
static String deviceWinMob
           
static String deviceWinPhone7
           
static String deviceXbox
           
static String deviceXoom
           
static String disUpdate
           
static String engineBlazer
           
static String engineNetfront
           
static String engineOpenWeb
           
static String engineOpera
           
static String enginePie
           
static String engineTelecaQ
           
static String engineUpBrowser
           
static String engineWebKit
           
static String engineXiino
           
 boolean isIphone
           
 boolean isTierGenericMobile
           
 boolean isTierIphone
           
 boolean isTierRichCss
           
 boolean isTierTablet
           
static String linux
           
static String maemo
           
static String maemoTablet
           
static String manuericsson
           
static String manuHtc
           
static String manuSamsung1
           
static String manuSony
           
static String manuSonyEricsson
           
static String mini
           
static String mobi
           
static String mobile
           
static String mylocom2
           
static String qtembedded
           
static String svcDocomo
           
static String svcKddi
           
static String svcVodafone
           
static String uplink
           
static String vndRIM
           
static String vndwap
           
static String wml
           
 
Constructor Summary
UAgentInfo(String userAgent, String httpAccept)
          Initialize the userAgent and httpAccept variables
 
Method Summary
 boolean detectAndroid()
          Detects if the current device is an Android OS-based device.
 boolean DetectAndroidTablet()
          Detects if the current device is an Android tablet.
 boolean detectAndroidWebKit()
          Detects if the current device is an Android OS-based device and the browser is based on WebKit.
 boolean detectArchos()
          Detects if the current device is an Archos media player/Internet tablet.
 boolean detectBlackBerry()
          Detects if the current browser is a BlackBerry of some sort.
 boolean detectBlackBerryHigh()
          Detects if the current browser is a BlackBerry device AND has a more capable recent browser.
 boolean detectBlackBerryLow()
          Detects if the current browser is a BlackBerry device AND has an older, less capable browser.
 boolean DetectBlackBerryTablet()
          Detects if the current browser is on a BlackBerry tablet device.
 boolean detectBlackBerryTouch()
          Detects if the current browser is a BlackBerry Touch device, such as the Storm or Torch
 boolean DetectBlackBerryWebKit()
          Detects if the current browser is a BlackBerry device AND uses a WebKit-based browser.
 boolean detectBrewDevice()
          Detects whether the device is a Brew-powered device.
 boolean detectDangerHiptop()
          Detects the Danger Hiptop device.
 boolean detectGameConsole()
          Detects if the current device is an Internet-capable game console.
 boolean detectGarminNuvifone()
          Detects if the current browser is a Garmin Nuvifone.
 boolean DetectGoogleTV()
          Detects if the current device is a GoogleTV.
 boolean detectIpad()
          Detects if the current device is an iPad tablet.
 boolean detectIphone()
          Detects if the current device is an iPhone.
 boolean detectIphoneOrIpod()
          Detects if the current device is an iPhone or iPod Touch.
 boolean detectIpod()
          Detects if the current device is an iPod Touch.
 boolean detectKindle()
          Detects if the current device is an Amazon Kindle.
 boolean detectMaemoTablet()
          Detects if the current device is on one of the Maemo-based Nokia Internet Tablets.
 boolean detectMidpCapable()
          Detects if the current device supports MIDP, a mobile Java technology.
 boolean detectMobileLong()
          The longer and more thorough way to detect for a mobile device.
 boolean detectMobileQuick()
          The quick way to detect for a mobile device.
 boolean detectNintendo()
          Detects if the current device is a Nintendo game device.
 boolean detectOperaMobile()
          Detects Opera Mobile or Opera Mini.
 boolean detectPalmOS()
          Detects if the current browser is on a PalmOS device.
 boolean detectPalmWebOS()
          Detects if the current browser is on a Palm device running the new WebOS.
 boolean detectS60OssBrowser()
          Detects if the current browser is the S60 Open Source Browser.
 boolean detectSmartphone()
          Check to see whether the device is any device in the 'smartphone' category.
 boolean detectSonyMylo()
          Detects if the current browser is a Sony Mylo device.
 boolean detectSonyPlaystation()
          Detects if the current device is a Sony Playstation.
 boolean detectSymbianOS()
          Detects if the current device is any Symbian OS-based device, including older S60, Series 70, Series 80, Series 90, and UIQ, or other browsers running on these devices.
 boolean detectTierIphone()
          The quick way to detect for a tier of devices.
 boolean detectTierOtherPhones()
          The quick way to detect for a tier of devices.
 boolean detectTierRichCss()
          The quick way to detect for a tier of devices.
 boolean detectTierTablet()
          The quick way to detect for a tier of devices.
 boolean detectWapWml()
          Detects whether the device supports WAP or WML.
 boolean detectWebkit()
          Detects if the current browser is based on WebKit.
 boolean detectWindowsMobile()
          Detects if the current browser is a Windows Mobile device.
 boolean DetectWindowsPhone7()
          Detects if the current browser is a Windows Phone 7 device.
 boolean detectXbox()
          Detects if the current device is a Microsoft Xbox.
 String getHttpAccept()
          Return the lower case HTTP_ACCEPT
 boolean getIsIphone()
          Return whether the device is an Iphone or iPod Touch
 boolean getIsTierGenericMobile()
          Return whether the device is an Iphone or iPod Touch
 boolean getIsTierIphone()
          Return whether the device is in the Iphone Tier.
 boolean getIsTierRichCss()
          Return whether the device is an Iphone or iPod Touch
 boolean getIsTierTablet()
          Return whether the device is in the Tablet Tier.
 String getUserAgent()
          Return the lower case HTTP_USER_AGENT
 void initDeviceScan()
          Initialize Key Stored Values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isIphone

public boolean isIphone

isTierTablet

public boolean isTierTablet

isTierIphone

public boolean isTierIphone

isTierRichCss

public boolean isTierRichCss

isTierGenericMobile

public boolean isTierGenericMobile

engineWebKit

public static final String engineWebKit
See Also:
Constant Field Values

deviceIphone

public static final String deviceIphone
See Also:
Constant Field Values

deviceIpod

public static final String deviceIpod
See Also:
Constant Field Values

deviceIpad

public static final String deviceIpad
See Also:
Constant Field Values

deviceMacPpc

public static final String deviceMacPpc
See Also:
Constant Field Values

deviceAndroid

public static final String deviceAndroid
See Also:
Constant Field Values

deviceGoogleTV

public static final String deviceGoogleTV
See Also:
Constant Field Values

deviceXoom

public static final String deviceXoom
See Also:
Constant Field Values

deviceSymbian

public static final String deviceSymbian
See Also:
Constant Field Values

deviceS60

public static final String deviceS60
See Also:
Constant Field Values

deviceS70

public static final String deviceS70
See Also:
Constant Field Values

deviceS80

public static final String deviceS80
See Also:
Constant Field Values

deviceS90

public static final String deviceS90
See Also:
Constant Field Values

deviceWinPhone7

public static final String deviceWinPhone7
See Also:
Constant Field Values

deviceWinMob

public static final String deviceWinMob
See Also:
Constant Field Values

deviceWindows

public static final String deviceWindows
See Also:
Constant Field Values

deviceIeMob

public static final String deviceIeMob
See Also:
Constant Field Values

devicePpc

public static final String devicePpc
See Also:
Constant Field Values

enginePie

public static final String enginePie
See Also:
Constant Field Values

deviceBB

public static final String deviceBB
See Also:
Constant Field Values

vndRIM

public static final String vndRIM
See Also:
Constant Field Values

deviceBBStorm

public static final String deviceBBStorm
See Also:
Constant Field Values

deviceBBBold

public static final String deviceBBBold
See Also:
Constant Field Values

deviceBBTour

public static final String deviceBBTour
See Also:
Constant Field Values

deviceBBCurve

public static final String deviceBBCurve
See Also:
Constant Field Values

deviceBBTorch

public static final String deviceBBTorch
See Also:
Constant Field Values

deviceBBPlaybook

public static final String deviceBBPlaybook
See Also:
Constant Field Values

devicePalm

public static final String devicePalm
See Also:
Constant Field Values

deviceWebOS

public static final String deviceWebOS
See Also:
Constant Field Values

engineBlazer

public static final String engineBlazer
See Also:
Constant Field Values

engineXiino

public static final String engineXiino
See Also:
Constant Field Values

deviceKindle

public static final String deviceKindle
See Also:
Constant Field Values

deviceNuvifone

public static final String deviceNuvifone
See Also:
Constant Field Values

vndwap

public static final String vndwap
See Also:
Constant Field Values

wml

public static final String wml
See Also:
Constant Field Values

deviceBrew

public static final String deviceBrew
See Also:
Constant Field Values

deviceDanger

public static final String deviceDanger
See Also:
Constant Field Values

deviceHiptop

public static final String deviceHiptop
See Also:
Constant Field Values

devicePlaystation

public static final String devicePlaystation
See Also:
Constant Field Values

deviceNintendoDs

public static final String deviceNintendoDs
See Also:
Constant Field Values

deviceNintendo

public static final String deviceNintendo
See Also:
Constant Field Values

deviceWii

public static final String deviceWii
See Also:
Constant Field Values

deviceXbox

public static final String deviceXbox
See Also:
Constant Field Values

deviceArchos

public static final String deviceArchos
See Also:
Constant Field Values

engineOpera

public static final String engineOpera
See Also:
Constant Field Values

engineNetfront

public static final String engineNetfront
See Also:
Constant Field Values

engineUpBrowser

public static final String engineUpBrowser
See Also:
Constant Field Values

engineOpenWeb

public static final String engineOpenWeb
See Also:
Constant Field Values

deviceMidp

public static final String deviceMidp
See Also:
Constant Field Values

uplink

public static final String uplink
See Also:
Constant Field Values

engineTelecaQ

public static final String engineTelecaQ
See Also:
Constant Field Values

devicePda

public static final String devicePda
See Also:
Constant Field Values

mini

public static final String mini
See Also:
Constant Field Values

mobile

public static final String mobile
See Also:
Constant Field Values

mobi

public static final String mobi
See Also:
Constant Field Values

maemo

public static final String maemo
See Also:
Constant Field Values

maemoTablet

public static final String maemoTablet
See Also:
Constant Field Values

linux

public static final String linux
See Also:
Constant Field Values

qtembedded

public static final String qtembedded
See Also:
Constant Field Values

mylocom2

public static final String mylocom2
See Also:
Constant Field Values

manuSonyEricsson

public static final String manuSonyEricsson
See Also:
Constant Field Values

manuericsson

public static final String manuericsson
See Also:
Constant Field Values

manuSamsung1

public static final String manuSamsung1
See Also:
Constant Field Values

manuSony

public static final String manuSony
See Also:
Constant Field Values

manuHtc

public static final String manuHtc
See Also:
Constant Field Values

svcDocomo

public static final String svcDocomo
See Also:
Constant Field Values

svcKddi

public static final String svcKddi
See Also:
Constant Field Values

svcVodafone

public static final String svcVodafone
See Also:
Constant Field Values

disUpdate

public static final String disUpdate
See Also:
Constant Field Values
Constructor Detail

UAgentInfo

public UAgentInfo(String userAgent,
                  String httpAccept)
Initialize the userAgent and httpAccept variables

Parameters:
userAgent - the User-Agent header
httpAccept - the Accept header
Method Detail

getUserAgent

public String getUserAgent()
Return the lower case HTTP_USER_AGENT


getHttpAccept

public String getHttpAccept()
Return the lower case HTTP_ACCEPT


getIsIphone

public boolean getIsIphone()
Return whether the device is an Iphone or iPod Touch


getIsTierTablet

public boolean getIsTierTablet()
Return whether the device is in the Tablet Tier.


getIsTierIphone

public boolean getIsTierIphone()
Return whether the device is in the Iphone Tier.


getIsTierRichCss

public boolean getIsTierRichCss()
Return whether the device is an Iphone or iPod Touch


getIsTierGenericMobile

public boolean getIsTierGenericMobile()
Return whether the device is an Iphone or iPod Touch


initDeviceScan

public void initDeviceScan()
Initialize Key Stored Values.


detectIphone

public boolean detectIphone()
Detects if the current device is an iPhone.


detectIpod

public boolean detectIpod()
Detects if the current device is an iPod Touch.


detectIpad

public boolean detectIpad()
Detects if the current device is an iPad tablet.


detectIphoneOrIpod

public boolean detectIphoneOrIpod()
Detects if the current device is an iPhone or iPod Touch.


detectAndroid

public boolean detectAndroid()
Detects if the current device is an Android OS-based device. Ignores tablets (Honeycomb and later).


DetectAndroidTablet

public boolean DetectAndroidTablet()
Detects if the current device is an Android tablet. Must be at least 8 inches and Honeycomb or later. This function will be updated rapidly as good tablets emerge in 2011.


detectAndroidWebKit

public boolean detectAndroidWebKit()
Detects if the current device is an Android OS-based device and the browser is based on WebKit.


DetectGoogleTV

public boolean DetectGoogleTV()
Detects if the current device is a GoogleTV.


detectWebkit

public boolean detectWebkit()
Detects if the current browser is based on WebKit.


detectS60OssBrowser

public boolean detectS60OssBrowser()
Detects if the current browser is the S60 Open Source Browser.


detectSymbianOS

public boolean detectSymbianOS()
Detects if the current device is any Symbian OS-based device, including older S60, Series 70, Series 80, Series 90, and UIQ, or other browsers running on these devices.


DetectWindowsPhone7

public boolean DetectWindowsPhone7()
Detects if the current browser is a Windows Phone 7 device.


detectWindowsMobile

public boolean detectWindowsMobile()
Detects if the current browser is a Windows Mobile device. Excludes Windows Phone 7 devices. Focuses on Windows Mobile 6.xx and earlier.


detectBlackBerry

public boolean detectBlackBerry()
Detects if the current browser is a BlackBerry of some sort.


DetectBlackBerryTablet

public boolean DetectBlackBerryTablet()
Detects if the current browser is on a BlackBerry tablet device. Example: PlayBook


DetectBlackBerryWebKit

public boolean DetectBlackBerryWebKit()
Detects if the current browser is a BlackBerry device AND uses a WebKit-based browser. These are signatures for the new BlackBerry OS 6. Examples: Torch


detectBlackBerryTouch

public boolean detectBlackBerryTouch()
Detects if the current browser is a BlackBerry Touch device, such as the Storm or Torch


detectBlackBerryHigh

public boolean detectBlackBerryHigh()
Detects if the current browser is a BlackBerry device AND has a more capable recent browser. Examples, Storm, Bold, Tour, Curve2 Excludes the new BlackBerry OS 6 browser!!


detectBlackBerryLow

public boolean detectBlackBerryLow()
Detects if the current browser is a BlackBerry device AND has an older, less capable browser. Examples: Pearl, 8800, Curve1


detectPalmOS

public boolean detectPalmOS()
Detects if the current browser is on a PalmOS device.


detectPalmWebOS

public boolean detectPalmWebOS()
Detects if the current browser is on a Palm device running the new WebOS.


detectGarminNuvifone

public boolean detectGarminNuvifone()
Detects if the current browser is a Garmin Nuvifone.


detectSmartphone

public boolean detectSmartphone()
Check to see whether the device is any device in the 'smartphone' category.


detectBrewDevice

public boolean detectBrewDevice()
Detects whether the device is a Brew-powered device.


detectDangerHiptop

public boolean detectDangerHiptop()
Detects the Danger Hiptop device.


detectOperaMobile

public boolean detectOperaMobile()
Detects Opera Mobile or Opera Mini.


detectWapWml

public boolean detectWapWml()
Detects whether the device supports WAP or WML.


detectKindle

public boolean detectKindle()
Detects if the current device is an Amazon Kindle.


detectMobileQuick

public boolean detectMobileQuick()
The quick way to detect for a mobile device. Will probably detect most recent/current mid-tier Feature Phones as well as smartphone-class devices. Excludes Apple iPads.


detectSonyPlaystation

public boolean detectSonyPlaystation()
Detects if the current device is a Sony Playstation.


detectNintendo

public boolean detectNintendo()
Detects if the current device is a Nintendo game device.


detectXbox

public boolean detectXbox()
Detects if the current device is a Microsoft Xbox.


detectGameConsole

public boolean detectGameConsole()
Detects if the current device is an Internet-capable game console.


detectMidpCapable

public boolean detectMidpCapable()
Detects if the current device supports MIDP, a mobile Java technology.


detectMaemoTablet

public boolean detectMaemoTablet()
Detects if the current device is on one of the Maemo-based Nokia Internet Tablets.


detectArchos

public boolean detectArchos()
Detects if the current device is an Archos media player/Internet tablet.


detectSonyMylo

public boolean detectSonyMylo()
Detects if the current browser is a Sony Mylo device.


detectMobileLong

public boolean detectMobileLong()
The longer and more thorough way to detect for a mobile device. Will probably detect most feature phones, smartphone-class devices, Internet Tablets, Internet-enabled game consoles, etc. This ought to catch a lot of the more obscure and older devices, also -- but no promises on thoroughness!


detectTierTablet

public boolean detectTierTablet()
The quick way to detect for a tier of devices. This method detects for the new generation of HTML 5 capable, larger screen tablets. Includes iPad, Android (e.g., Xoom), BB Playbook, etc.


detectTierIphone

public boolean detectTierIphone()
The quick way to detect for a tier of devices. This method detects for devices which can display iPhone-optimized web content. Includes iPhone, iPod Touch, Android, Palm WebOS, etc.


detectTierRichCss

public boolean detectTierRichCss()
The quick way to detect for a tier of devices. This method detects for devices which are likely to be capable of viewing CSS content optimized for the iPhone, but may not necessarily support JavaScript. Excludes all iPhone Tier devices.


detectTierOtherPhones

public boolean detectTierOtherPhones()
The quick way to detect for a tier of devices. This method detects for all other types of phones, but excludes the iPhone and RichCSS Tier devices.


RichFaces Showcase 4.1.0.20111101-M4

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.