Entering content frame

Object documentation ClientInfo Interface Locate the document in its SAP Library structure

Definition

The ClientInfo interface provides a range of methods for developing Java applications for mobile devices. These methods take into account the different display options for Web applications on different browsers, along with other device-specific properties – such as screen size or input method.

Use

In this way, you can use the methods of the ClientInfo interface when you create Java applications, and thus take the – often substantial – differences in the display of Web pages on different devices into account.

So that you can estimate the significance for your Web application of the methods described in the following table, some of them have been assigned a priority. For those device properties not assigned a priority, you can decide yourself whether or not you want to use them in your Web application.

Device properties can be categorized by their significance as follows:

Priority

Title

Description

1

Prerequisite

This property is prerequisite for running the mobile application at all. In general, these conditions are fulfilled by all "real" devices that fulfil the HTML or WAP standard. Emulators, however, do not fulfil these prerequisites. Thus this property need not be checked in the application. At most, you need a check program that ascertains whether or not an emulator is suitable for executing the application

2

Application does not work

If this property is not assigned a value, the application may crash on some devices – that is, may not be executable

3

Loss of information

If this property is not assigned a value, the application may not show all its information For example, a loss of information may occur if the paragraph attribute for automatic line breaks is switched off (<p mode=nowrap>) and the paragraph (in a WML page) contains text that does not fit on one line. If the mobile device does not support the isMarqueeTextSupported property, it is possible that the end of the text is simply truncated. For this reason we advise you to think carefully before switching off the automatic line break property – even if doing so would allow you, for example, to make better use of a small screen on a mobile telephone.

4

Unacceptable display

If this property is not assigned a value, the application may be displayed in a way that does not do justice to the look and feel of the device

5

Inappropriate display

If this property is not assigned a value, the application may not be displayed at its best. However, the display will not actually disturb the user.

Similarly, some properties are assigned to the markup languages WML (Wireless Markup Language) and HTML (Hypertext Markup Language) – that is, you specify the markup language for which each method is relevant and thus how it can meaningfully be used. For example, the method isFramesSupported is only significant for HTML, since only HTML-enabled browsers can interpret frames. In general, it is HTML browsers on handheld devices like PDAs and pocket PCs, WAP-enabled mobile telephones with small screens cannot display frames, because of their screen interfaces. If the appropriate table column does not contain a value, the method can be used in both markup languages.

The following source code fragment shows how you can access the methods of the ClientInfo interface:

ClientInfoFactory factory = ClientInfoFactory.newInstance();
ClientInfo clientInfo = factory.newClientInfo();
clientInfo.load(request);
if(clientInfo.isTitleSupported())
// do sth if title is supported
...
else
// do sth if title is not supported
...

Note

To obtain more information on using some of these methods in your Web application, use the links in the table.

Methods

Method

Signature

Description

Possible values

Content type

Prio.

getAccept

method getAccept returning
value type String

Equivalent to the HTTP request-header „USER-AGENT".

     

isAlertingSupported

method isAlertingSupported
returning
value type boolean

Specifies whether or not the device supports messaging – for example, using SMS.

"true" or
"false"

 

1

isAnchorSupported

method isAnchorSupported
returning
value type boolean

Specifies whether or not the <anchor> tag is supported

"true" or
"false"

WML

1

isAnchorPrevSupported

method isAnchorPrevSupported
returning
value type boolean

Specifies whether or not the anchor tag supports a "Back" action

"true" or
"false"

WML

 

isAppLinksSupported

method isAppLinksSupported
returning
value type boolean

Specifies whether or not you can call a local application on a device using a special link

"true" or
"false"

HTML

3

getAppLinkTypes

method getAppLinkTypes
returning
value type String

Specifies what type of application links the device supports

 

HTML

 

isBackHardWired

method getBackHardWired
returning
value type boolean

Specifies whether or not you can execute the "Back" function using a fixed key without an associated tag

"true" or
"false"

WML

4

getBackLabel

method getBackLabel
returning
value type boolean

Specifies whether or not a label attribute must be specified to display a label

"true" or
"false"

WML

3

isBackToAnyUrlSupported

method isBackToAnyUrlSupported
returning
value type boolean

Specifies whether the <do type="prev"> tag can lead to any Web address

"true" or
"false"

WML

1

isBigSupported

method isBigSupported
returning
value type boolean

Specifies whether or not text can be formatted as "large"

"true" or
"false"

WML

 

isBoldSupported

method isBoldSupported
returning
value type boolean

Specifies whether or not text can be formatted as "bold"

"true" or
"false"

WML

 

getBreakingSpace

method getBreakingSpace
returning
value type String

Returns the smallest character string for an empty space

     

getBrowserCategory

method getBrowserCategory
returning
value type String

Returns the browser category

„unknown"
„pocketie"
„avantgo"
„imode"
„palm"
„wap"
„epoc"

   

getBrowserName

method getBrowserName
returning
value type String

Returns the browser name

„unknown"
„InternetExplorer"
„NetscapeNavigator"
„mobile"

   

getBrowserOs

method getBrowserOs
returning
value type String

Returns the operating system running on the device

„unknown"
„HPUX"
„Linux"
„MacPPC"
„SunOS"
„Win32"
„mobile"

   

getBrowserVersion

method getBrowserVersion
returning
value type String

Returns the browser version, for example 5.5

     

isCacheEnabledByDefault

method isCacheEnabledByDefault
returning
value type boolean

Specifies whether or not cache memory on the browser is activated by default

"true" or
"false"

   

isCertificatesSupported

method isCertificatesSupported
returning
value type boolean

Specifies whether or not the device supports client certificates

"true" or
"false"

   

getCharHeight

method getCharHeight
returning
value type short

Returns the screen height in rows

   

4

getCharWidth

method getCharWidth
returning
value type short

Returns the screen width in characters

   

4

getColorDepth

method getColorDepth
returning
value type short

Returns the color depth, for example 256 colors

 

HTML

 

isColorSupported

method isColorSupported
returning
value type boolean

Specifies whether or not the device has a color screen

"true" or
"false"

HTML

 

getContentType

method getContentType
returning
value type String

Returns the content type, for example HTML or WML

   

2

getContentTypeVersion

method getContentTypeVersion
returning
value type String

Returns the version of the content type – for example, 3.2 for HTML 3.2 or 1.1 for WML 1.1

     

isCookiesSupported

method isCookiesSupported
returning
value type boolean

Specifies whether or not browser cookies are supported

"true" or
"false"

 

1

isCssSupported

method isCssSupported
returning
value type boolean

Specifies whether or not the browser supports CSSs (Cascading Style Sheets).

"true" or
"false"

HTML

4

getCssVersion

method getCssVersion
returning
value type String

Returns the CSS version

 

HTML

 

getDefaultActionDesign

method getDefaultActionDesign returning
value type String

Returns the default design for user interface elements representing an action

„link"
„button"
„softkey"
„linkAndSoftkey"

WML

3

getDefaultBlockSeparator

method getDefaultBlockSeparator
returning
value type String

Returns the default string used to separate paragraphs

   

5

getDefaultBullet

method getDefaultBullet
returning
value type String

Returns the default symbol used to indicate points in a list

 

WML

5

getDefaultFormStyle

method getDefaultFormStyle
returning
value type String

Returns the default display type for input masks

„onePage"
„menu"
„wizard"

WML

 

getDefaultMenuStyle

method getDefaultMenuStyle
returning
value type String

Returns the default display type for menus

„selectionList"
„linkList"

WML

4

getDeviceCategory

method getDeviceCategory
returning
value type String

Returns the device category

„unknown"
„Phone"
„PDA"
„Voice"
„PC"

   

getDeviceName

method getDeviceName
returning
value type String

Returns the device name Unique ID for a set of device properties

     

isDomSupported

method isDomSupported
returning
value type boolean

Specifies whether or not the browser supports a Document Object Model (DOM)

"true" or
"false"

HTML

 

getDomVersion

method getDomVersion
returning
value type String

Returns the Document Object Model (DOM) version supported

 

HTML

 

isEmphasizedSupported

method isEmphasizedSupported
returning
value type boolean

Specifies whether or not text can be formatted as "highlighted"

"true" or
"false"

WML

5

isEmulator

method isEmulator
returning
value type boolean

Specifies whether or not the device is to be categorized as an emulator

"true" or
"false"

   

getFieldsetLayout

method getFieldsetLayout
returning
value type String

Specifies how input fields that belong together are to be laid out using the <fieldset> tag

„notSupported"
„ignored"
„beneath"
„beneathWithIndent"
„sideBySide"

WML

3

isFieldsetTitleVisible

method isFieldsetTitleVisible
returning
value type boolean

Specifies whether or not the title attribute of the <fieldset> tag is used as label.

"true" or
"false"

WML

3

isFontProportional

method isFontProportional
returning
value type boolean

Specifies whether or not the default font of the device is a proportional font

"true" or
"false"

   

getFormFactor

method getFormFactor
returning
value type String

Returns the device’s screen format

„PC"
„VGA"
„halfVGA"
„mediumLandscape"
„mediumPortrait"
„phone"
„unknown

 

3

isFormMenuSupported

method isFormMenuSupported
returning
value type boolean

Specifies whether or not the browser supports the technique of displaying a selection menu with the input mask

"true" or
"false"

WML

4

isFramesSupported

method isFramesSupported
returning
value type boolean

Specifies whether or not frames are supported

"true" or
"false"

HTML

2

getGrayLevel

method getGrayLevel
returning
value type short

Returns the number of shades of gray supported in grayscale pictures

"true" or
"false"

   

isHorzScrollingSupported

method isHorzScrollingSupported
returning
value type boolean

Specifies whether or not the device has a horizontal scroll bar

"true" or
"false"

   

isHrefWithParamsSupported

method isHhrefWithParamsSupported
returning
value type boolean

Specifies whether or not an Href attribute in a link can contain URL parameters.

"true" or
"false"

WML

2

isHttpGetSupported

method isHttpGetSupported
returning
value type boolean

Specifies whether or not the HTTP GET is supported

"true" or
"false"

WML

1

isHttpPostSupported

method isHttpPostSupported
returning
value type boolean

Specifies whether or not the HTTP POST is supported

"true" or
"false"

WML

1

isImageAlignmentSupported

method isImageAlignmentSupported
returning
value type boolean

Specifies whether or not a graphic can be aligned (left, right, or centered)

"true" or
"false"

WML

 

isImageLinksSupported

method isImageLinksSupported
returning
value type boolean

Specifies whether or not a graphic can be used as link.

"true" or
"false"

 

2

getImageSizeMax

method getImageSizeMax
returning
value type short

Returns the maximum memory size of a graphic

 

WML

 

getInputFormatDate

method getInputFormatDate
returning
value type String

Returns the character string used to specify the format for dates

 

WML

 

getInputFormatNumeric

method getInputFormatNumeric
returning
value type String

Returns the formatting character string used to specify the format for numeric values

 

WML

 

isInputMethodHandWriting

method isInputMethodHandWriting
returning
value type boolean

Specifies whether or not the device supports handwritten input

"true" or
"false"

   

isInputMethodKeyboard

method isInputMethodKeyboard
returning
value type boolean

Specifies whether or not the device supports input using a keyboard

"true" or
"false"

   

isInputMethodKeypad

method isInputMethodKeypad
returning
value type boolean

Specifies whether or not the device supports input using a telephone keypad

"true" or
"false"

   

isInputMethodKeypadIntell

method isInputMethodKeypadIntell
returning
value type boolean

Specifies whether or not the device supports input using T9 text input or similar

"true" or
"false"

   

isInputMethodVoice

method isInputMethodVoice
returning
value type boolean

Specifies whether or not the device supports speech input

"true" or
"false"

   

isInputShownWithCaption

method isInputShownWithCaption
returning
value type boolean

Specifies whether or not the browser uses the title attribute of the <input> tag is used as a label

"true" or
"false"

WML

3

isItalicSupported

method isItalicSupported
returning
value type boolean

Specifies whether or not text can be formatted as "ítalic"

"true" or
"false"

WML

5

isJavaSupported

method isJavaSupported
returning
value type boolean

Specifies whether or not the device supports the Java programming language

"true" or
"false"

HTML

1

getJavaVersion

method getJavaVersion
returning
value type String

Returns the Java version supported

 

HTML

 

isLinksSeparated

method isLinksSeparated
returning
value type boolean

Specifies whether or not two consecutive links are visibly separated

"true" or
"false"

WML

4

getLinkDecoration

method getLinkDecoration
returning
value type String

Returns the delimiters that are automatically added to the link text by the device – for example [ ] or < >.

 

WML

 

getLinkTextWidth

method getLinkTextWidth
returning
value type short

Returns the maximum number of characters that a link can have to fit into one line.

 

WML

3

isLocalImagesSupported

method isLocalImagesSupported
returning
value type boolean

Specifies whether or not the device supports locally stored graphics or symbols

"true" or
"false"

 

3

isLocalVariablesSupported

method isLocalVariablesSupported
returning
value type boolean

Specifies whether or not the browser supports local variables

"true" or
"false"

WML

1

isMarqueeLinkSupported

method isMarqueeLinkSupported
returning
value type boolean

Specifies whether or not a long link can be displayed in one line, for example as a ticker tape.

"true" or
"false"

WML

3

isMarqueeTextSupported

method isMarqueeTextSupported
returning
value type boolean

Specifies whether or not a long text can be displayed in one line, for example as a ticker tape.

"true" or
"false"

WML

3

getMaxLinkLength

method getMaxLinkLength
returning
value type short

Returns the maximum size of the Href attributes of a link.

   

1

getMediaFormats

method getMediaFormats
returning
value type String

Returns the list of multimedia formats supported – such as .agif (animated .gif format), .gif, .jpg, .png, .wbmp

   

3

getMemory

method getMemory
returning
value type String

Returns the maximum memory capacity of the device

 

HTML

 

getModel

method getModel
returning
value type String

Returns the name of the device type – such as 7110 for the Nokia 7110 mobile telephone

     

isNbspSupported

method isNbspSupported
returning
value type boolean

Specifies whether or not the device supports non-breaking blank characters

"true" or
"false"

WML

4

isNestedTablesSupported

method isNestedTablesSupported
returning
value type boolean

Specifies whether or not the browser supports nested tables

"true" or
"false"

HTML

2

isNewlineAfterImage

method getNewlineAfterImage
returning
value type boolean

Specifies whether or not a line break is inserted automatically after an <img> tag.

"true" or
"false"

WML

4

isNewlineAfterInput

method isNewlineAfterInput
returning
value type boolean

Specifies whether or not a line break is inserted automatically after an <input> tag on a specific mobile device.

"true" or
"false"

WML

4

isNewlineAfterLink

method getNewlineAfterLink
returning
value type boolean

Specifies whether or not a line break is inserted automatically after a link

"true" or
"false"

WML

4

isNewlineAfterSelect

method isNewlineAfterSelect
returning
value type boolean

Specifies whether or not a line break is inserted automatically after an <select> tag.

"true" or
"false"

WML

4

isNewlineBeforeImage

method isNewlineBeforeImage
returning
value type boolean

Specifies whether or not a line break is inserted automatically before an <img> tag.

"true" or
"false"

WML

4

isNewlineBeforeInput

method isNewlineBeforeInput
returning
value type boolean

Specifies whether or not a line break is inserted automatically before an <input> tag.

"true" or
"false"

WML

4

isNewlineBeforeLink

method isNewlineBeforeLink
returning
value type boolean

Specifies whether or not a line break is inserted automatically before a link

"true" or
"false"

WML

4

isNewlineBeforeSelect

method isNewlineBeforeSelect
returning
value type boolean

Specifies whether or not a line break is inserted automatically before an <select> tag.

"true" or
"false"

WML

4

isNewlineBetweenImages

method isNewlineBetweenImages
returning
value type boolean

Specifies whether or not a line break is inserted automatically after an <image> tag

"true" or
"false"

WML

3

isNewlineBetweenLinks

method isNewlineBetweenLinks
returning
value type boolean

Specifies whether or not a line break is inserted automatically between two <image> tags

"true" or
"false"

WML

4

isNewlineBetwLinkAndTag

method isNewlineBetwLinkAndTag
returning
value type boolean

Specifies whether or not a line break is inserted automatically between a link and a tag

"true" or
"false"

WML

4

isOfflineBrowsingSupported

method isOfflineBrowsingSupported
returning
value type boolean

Specifies whether or not the browser supports offline browsing through locally stored pages (that is, cached pages)

"true" or
"false"

HTML

2

isOfflineFormsSuppported

method isOfflineFormsSupported
returning
value type boolean

Specifies whether or not the browser allows the user to fill out input forms offline on the device

"true" or
"false"

HTML

2

getPageSizeMax

method getPageSizeMax
returning
value type int

Returns the maximum page size that can be processed in a mobile device.

   

2

getPixelHeight

method getPixelHeight
returning
value type short

Specifies the screen height in pixels.

     

getPixelWidth

method getPixelWidth
returning
value type short

Specifies the screen width in pixels.

     

isRedirAbsoluteSupported

method isRedirAbsoluteSupported
returning
value type boolean

Specifies whether or not the browser supports the redirection of an absolute URL address.

"true" or
"false"

 

1

isRedirRelativeSupported

method isRedirRelativeSupported
returning
value type boolean

Specifies whether or not the browser supports the redirection of a relative URL address.

"true" or
"false"

 

2

isScriptSupported

method isScriptSupported
returning
value type boolean

Specifies whether or not the browser supports scripting

"true" or
"false"

 

2

getScriptVersion

method getScriptVersion
returning
value type String

Returns the script version supported

     

isSecureProtocolsSupported

method isSecureProtocolsSupported
returning
value type boolean

Specifies whether or not the browser supports SSL (Secure Socket Layer) or WTLS (Wireless Transport Layer Security)

"true" or
"false"

   

getSecureProtocolNames

method getSecureProtocolsNames
returning
value type String

Returns the names of the security protocols supported The names are separated by semicolons

     

isSelectionMenuSupported

method isSelectionMenuSupported
returning
value type boolean

Specifies whether or not the menu layout type "selectionList" is supported

"true" or
"false"

WML

4

isSetvarOnEventSupported

method isSetvarOnEventSupported
returning
value type boolean

Specifies whether or not the <setvar> tag can be used within the <onevent type="onenterforward"> event handler

"true" or
"false"

WML

1

isSkippingToInput

method isSkippingToInput
returning
value type boolean

Specifies whether or not the browser automatically skips to the first <input> tag and displays a screen extract around this tag

"true" or
"false"

WML

4

isSmallSupported

method isSmallSupported
returning
value type boolean

Specifies whether or not text can be formatted as "small"

"true" or
"false"

WML

5

getSoftkeyNum

method getSoftkeyNum
returning
value type short

Returns the number of soft keys supported by the device

 

WML

3

getSoftkeyStyle1

method getSoftkeyStyle1
returning
value type String

Specifies how soft key 1 is displayed on the screen

„notShown"
„key"
„menu"
„screen"

WML

5

getSoftkeyStyle2

method getSoftkeyStyle2
returning
value type String

Specifies how soft key 2 is displayed on the screen

„notShown"
„key"
„menu"
„screen"

WML

5

getSoftkeyTitleWidth

method getSoftkeyTitleWidth
returning
value type String

Returns the number of displayed characters for a soft key title.

 

WML

3

isSoundSupported

method isSoundSupported
returning
value type boolean

Specifies whether or not the device can play sounds

"true" or
"false"

HTML

 

isStrongSupported

method isStrongSupported
returning
value type boolean

Specifies whether or not text with the <strong>can be formatted as "highlighted"

"true" or
"false"

WML

5

isSubmitOneventSupported

method isSubmitOneventSupported
returning
value type boolean

Specifies whether or not "Submit" is supported within the <onevent type="onenterforward"> event handler

"true" or
"false"

 

1

getSubCategory

method getSubCategory
returning
value type String

Allows you to split devices into different sub-categories

Any text

   

isTableHasBorders

method isTableHasBorders
returning
value type boolean

Specifies whether or not tables are displayed with gridlines

"true" or
"false"

 

4

isTableSupported

method isTableSupported
returning
value type boolean

Specifies whether or not the browser supports tables with several columns

"true" or
"false"

 

3

isTelephonyLinksSupported

method isTelephonyLinksSupported
returning
value type boolean

Specifies whether or not a telephone can be dialed directly using a link

"true" or
"false"

 

4

isTextAlignmentSupported

method isTextAlignmentSupported
returning
value type boolean

Specifies whether or not text within a paragraph can be aligned left, right, or centered

"true" or
"false"

WML

5

isTextStylesSupported

method isTextStylesSupported
returning
value type boolean

Specifies whether or not the browser can format text using tags such as <b> or <small>

"true" or
"false"

WML

5

isTitleSupported

method isTitleSupported
returning
value type boolean

Specifies whether or not a label is to appear on the top of the screen using the "title" property of the <card> WML tag.

"true" or
"false"

WML

3

getTitleWidth

method getTitleWidth
returning
value type short

Returns the maximum number of characters of the title

   

3

isUnderlineSupported

method isUnderlineSupported
returning
value type boolean

Specifies whether or not text can be formatted as "underlined"

"true" or
"false"

WML

5

getUserAgent

method getUserAgent
returning
value type String

Equivalent to the HTTP request header "userAgent"

     

isVarsAcrossCardSupported

method isVarsAcrossCardSupported
returning
value type boolean

Specifies whether or not browser variables passed to a card can also be used for different cards

"true" or
"false"

WML

1

getVendor

method getVendor
returning
value type String

Returns the manufacturer’s name

     

isXslSupported

method isXslSupported
returning
value type boolean

Specifies whether or not the browser supports Extensible Stylesheet Language (XSL)

"true" or
"false"

HTML

 

getXslVersion

method getXslVersion
returning
value type String

Returns the XSL version supported

 

HTML

 

 

 

 

 

Leaving content frame