com.bemoko.live.platform.context.device
Interface Device

All Superinterfaces:
LiveContext

public interface Device
extends LiveContext

The Interface Device.


Method Summary
 String get(String property)
          Get an arbitrary property of the device as stored in the device repository.
 int getDisplayHeight()
          Get the height of the screen in pixels.
 int getDisplayWidth()
          Get the width of the screen in pixels.
 int getHeight()
          Deprecated. Replaced by getDisplayHeight()
 String getModel()
          Get model of the device.
 String getName()
          Get the name of the device as stored in the device repository.
 String getOs()
           
 String getStylesheetSupport()
          Get the style sheet support level.
 String getUserAgent()
          Get a user-agent string for this device.
 String getVendor()
          Get the vendor of the device.
 String getVendorModel()
          Get the vendor and model of device as a single value.
 int getWidth()
          Deprecated. Replaced by getDisplayWidth()
 boolean isRepository(String repository)
          Checks if this device has access to the specified repository
 
Methods inherited from interface com.bemoko.live.platform.context.LiveContext
getAsInt
 

Method Detail

getName

String getName()
Get the name of the device as stored in the device repository. This is a unique ID within the repository.

Specified by:
getName in interface LiveContext
Returns:
name of the device

get

String get(String property)
Get an arbitrary property of the device as stored in the device repository.

Specified by:
get in interface LiveContext
Parameters:
property - name of the device property to retrieve the value of
Returns:
property value of the property

getUserAgent

String getUserAgent()
Get a user-agent string for this device. This will not necessarily return an exact copy of the one that the user sent, it will simply be a valid user agent for the given device on the platform. A user agent is a more reliable mechanism for an input into another system than an ID of an arbitrary device repository.

Returns:
user agent

getDisplayWidth

int getDisplayWidth()
Get the width of the screen in pixels.

Returns:
the display width in pixels

getWidth

@Deprecated
int getWidth()
Deprecated. Replaced by getDisplayWidth()

Returns:
the display width in pixels

getDisplayHeight

int getDisplayHeight()
Get the height of the screen in pixels.

Returns:
the display height in pixels

getHeight

@Deprecated
int getHeight()
Deprecated. Replaced by getDisplayHeight()

Returns:
the display height in pixels

getVendor

String getVendor()
Get the vendor of the device.

Returns:
the vendor

getModel

String getModel()
Get model of the device.

Returns:
the model

getOs

String getOs()

getVendorModel

String getVendorModel()
Get the vendor and model of device as a single value. The value is a concatenation of getVendor()-getModel()

Returns:
the vendor model

getStylesheetSupport

String getStylesheetSupport()
Get the style sheet support level. The level is determined by the following table:
  1. -1 → no XHTML support at all
  2. 0 → basic XHTML support
  3. 1 → XHTML with some basic CSS
  4. 2 → place holder for future use
  5. 3 → excellent CSS support
  6. 4 → Ajax support

Returns:
the stylesheet support level

isRepository

boolean isRepository(String repository)
Checks if this device has access to the specified repository

Parameters:
repository - the repository
Returns:
true, if device does have access to the named repository