spring-mobile-device

org.springframework.mobile.device
Interface Device


public interface Device

A model for the user agent or device that submitted the current request. Callers may introspect this model to vary UI control or rendering logic by device type.

Author:
Keith Donald, Roy Clarkson, Scott Rossillo

Method Summary
 boolean isMobile()
          True if this device is a mobile device such as an Apple iPhone or an Nexus One Android.
 boolean isNormal()
          True if this device is not a mobile or tablet device.
 boolean isTablet()
          True if this device is a tablet device such as an Apple iPad or a Motorola Xoom.
 

Method Detail

isNormal

boolean isNormal()
True if this device is not a mobile or tablet device.


isMobile

boolean isMobile()
True if this device is a mobile device such as an Apple iPhone or an Nexus One Android. Could be used by a pre-handle interceptor to redirect the user to a dedicated mobile web site. Could be used to apply a different page layout or stylesheet when the device is a mobile device.


isTablet

boolean isTablet()
True if this device is a tablet device such as an Apple iPad or a Motorola Xoom. Could be used by a pre-handle interceptor to redirect the user to a dedicated tablet web site. Could be used to apply a different page layout or stylesheet when the device is a tablet device.


spring-mobile-device