!--a11y-->
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

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 |
Equivalent to the HTTP request-header „ USER-AGENT". |
|||
|
isAlertingSupported |
method isAlertingSupported |
Specifies whether or not the device supports messaging – for example, using SMS. |
"true" or |
1 |
|
|
isAnchorSupported |
method isAnchorSupported |
Specifies whether or not the <anchor> tag is supported |
"true" or |
WML |
1 |
|
isAnchorPrevSupported |
method isAnchorPrevSupported |
Specifies whether or not the anchor tag supports a "Back" action |
"true" or |
WML |
|
|
isAppLinksSupported |
method isAppLinksSupported |
Specifies whether or not you can call a local application on a device using a special link |
"true" or |
HTML |
3 |
|
getAppLinkTypes |
method getAppLinkTypes |
Specifies what type of application links the device supports |
HTML |
||
| isBackHardWired |
method getBackHardWired |
Specifies whether or not you can execute the "Back" function using a fixed key without an associated tag |
"true" or |
WML |
4 |
| getBackLabel |
method getBackLabel |
Specifies whether or not a label attribute must be specified to display a label |
"true" or |
WML |
3 |
|
isBackToAnyUrlSupported |
method isBackToAnyUrlSupported |
Specifies whether the <do type="prev"> tag can lead to any Web address |
"true" or |
WML |
1 |
|
isBigSupported |
method isBigSupported |
Specifies whether or not text can be formatted as "large" |
"true" or |
WML |
|
|
isBoldSupported |
method isBoldSupported |
Specifies whether or not text can be formatted as "bold" |
"true" or |
WML |
|
| getBreakingSpace |
method getBreakingSpace |
Returns the smallest character string for an empty space |
|||
| getBrowserCategory |
method getBrowserCategory |
Returns the browser category |
„unknown" |
||
| getBrowserName |
method getBrowserName |
Returns the browser name |
„unknown" |
||
| getBrowserOs |
method getBrowserOs |
Returns the operating system running on the device |
„unknown" |
||
|
getBrowserVersion |
method getBrowserVersion |
Returns the browser version, for example 5.5 |
|||
|
isCacheEnabledByDefault |
method isCacheEnabledByDefault |
Specifies whether or not cache memory on the browser is activated by default |
"true" or |
||
|
isCertificatesSupported |
method isCertificatesSupported |
Specifies whether or not the device supports client certificates |
"true" or |
||
| getCharHeight |
method getCharHeight |
Returns the screen height in rows |
4 |
||
| getCharWidth |
method getCharWidth |
Returns the screen width in characters |
4 |
||
|
getColorDepth |
method getColorDepth |
Returns the color depth, for example 256 colors |
HTML |
||
|
isColorSupported |
method isColorSupported |
Specifies whether or not the device has a color screen |
"true" or |
HTML |
|
|
getContentType |
method getContentType |
Returns the content type, for example HTML or WML |
2 |
||
|
getContentTypeVersion |
method getContentTypeVersion |
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 |
Specifies whether or not browser cookies are supported |
"true" or |
1 |
|
| isCssSupported |
method isCssSupported |
Specifies whether or not the browser supports CSSs (Cascading Style Sheets). |
"true" or |
HTML |
4 |
|
getCssVersion |
method getCssVersion |
Returns the CSS version |
HTML |
||
| getDefaultActionDesign |
method getDefaultActionDesign returning |
Returns the default design for user interface elements representing an action |
„link" |
WML |
3 |
| getDefaultBlockSeparator |
method getDefaultBlockSeparator |
Returns the default string used to separate paragraphs |
5 |
||
| getDefaultBullet |
method getDefaultBullet |
Returns the default symbol used to indicate points in a list |
WML |
5 |
|
| getDefaultFormStyle |
method getDefaultFormStyle |
Returns the default display type for input masks |
„onePage" |
WML |
|
| getDefaultMenuStyle |
method getDefaultMenuStyle |
Returns the default display type for menus |
„selectionList" |
WML |
4 |
| getDeviceCategory |
method getDeviceCategory |
Returns the device category |
„unknown" |
||
| getDeviceName |
method getDeviceName |
Returns the device name Unique ID for a set of device properties |
|||
|
isDomSupported |
method isDomSupported |
Specifies whether or not the browser supports a Document Object Model (DOM) |
"true" or |
HTML |
|
|
getDomVersion |
method getDomVersion |
Returns the Document Object Model (DOM) version supported |
HTML |
||
|
isEmphasizedSupported |
method isEmphasizedSupported |
Specifies whether or not text can be formatted as "highlighted" |
"true" or |
WML |
5 |
|
isEmulator |
method isEmulator |
Specifies whether or not the device is to be categorized as an emulator |
"true" or |
||
| getFieldsetLayout |
method getFieldsetLayout |
Specifies how input fields that belong together are to be laid out using the <fieldset> tag |
„notSupported" |
WML |
3 |
| isFieldsetTitleVisible |
method isFieldsetTitleVisible |
Specifies whether or not the title attribute of the <fieldset> tag is used as label. |
"true" or |
WML |
3 |
|
isFontProportional |
method isFontProportional |
Specifies whether or not the default font of the device is a proportional font |
"true" or |
||
| getFormFactor |
method getFormFactor |
Returns the device’s screen format |
„PC" |
3 |
|
| isFormMenuSupported |
method isFormMenuSupported |
Specifies whether or not the browser supports the technique of displaying a selection menu with the input mask |
"true" or |
WML |
4 |
| isFramesSupported |
method isFramesSupported |
Specifies whether or not frames are supported |
"true" or |
HTML |
2 |
|
getGrayLevel |
method getGrayLevel |
Returns the number of shades of gray supported in grayscale pictures |
"true" or |
||
|
isHorzScrollingSupported |
method isHorzScrollingSupported |
Specifies whether or not the device has a horizontal scroll bar |
"true" or |
||
| isHrefWithParamsSupported |
method isHhrefWithParamsSupported |
Specifies whether or not an Href attribute in a link can contain URL parameters. |
"true" or |
WML |
2 |
|
isHttpGetSupported |
method isHttpGetSupported |
Specifies whether or not the HTTP GET is supported |
"true" or |
WML |
1 |
|
isHttpPostSupported |
method isHttpPostSupported |
Specifies whether or not the HTTP POST is supported |
"true" or |
WML |
1 |
|
isImageAlignmentSupported |
method isImageAlignmentSupported |
Specifies whether or not a graphic can be aligned (left, right, or centered) |
"true" or |
WML |
|
| isImageLinksSupported |
method isImageLinksSupported |
Specifies whether or not a graphic can be used as link. |
"true" or |
2 |
|
|
getImageSizeMax |
method getImageSizeMax |
Returns the maximum memory size of a graphic |
WML |
||
|
getInputFormatDate |
method getInputFormatDate |
Returns the character string used to specify the format for dates |
WML |
||
|
getInputFormatNumeric |
method getInputFormatNumeric |
Returns the formatting character string used to specify the format for numeric values |
WML |
||
|
isInputMethodHandWriting |
method isInputMethodHandWriting |
Specifies whether or not the device supports handwritten input |
"true" or |
||
|
isInputMethodKeyboard |
method isInputMethodKeyboard |
Specifies whether or not the device supports input using a keyboard |
"true" or |
||
|
isInputMethodKeypad |
method isInputMethodKeypad |
Specifies whether or not the device supports input using a telephone keypad |
"true" or |
||
|
isInputMethodKeypadIntell |
method isInputMethodKeypadIntell |
Specifies whether or not the device supports input using T9 text input or similar |
"true" or |
||
|
isInputMethodVoice |
method isInputMethodVoice |
Specifies whether or not the device supports speech input |
"true" or |
||
| isInputShownWithCaption |
method isInputShownWithCaption |
Specifies whether or not the browser uses the title attribute of the <input> tag is used as a label |
"true" or |
WML |
3 |
|
isItalicSupported |
method isItalicSupported |
Specifies whether or not text can be formatted as "ítalic" |
"true" or |
WML |
5 |
|
isJavaSupported |
method isJavaSupported |
Specifies whether or not the device supports the Java programming language |
"true" or |
HTML |
1 |
|
getJavaVersion |
method getJavaVersion |
Returns the Java version supported |
HTML |
||
| isLinksSeparated |
method isLinksSeparated |
Specifies whether or not two consecutive links are visibly separated |
"true" or |
WML |
4 |
| getLinkDecoration |
method getLinkDecoration |
Returns the delimiters that are automatically added to the link text by the device – for example [ ] or < >. |
WML |
||
| getLinkTextWidth |
method getLinkTextWidth |
Returns the maximum number of characters that a link can have to fit into one line. |
WML |
3 |
|
|
isLocalImagesSupported |
method isLocalImagesSupported |
Specifies whether or not the device supports locally stored graphics or symbols |
"true" or |
3 |
|
|
isLocalVariablesSupported |
method isLocalVariablesSupported |
Specifies whether or not the browser supports local variables |
"true" or |
WML |
1 |
| isMarqueeLinkSupported |
method isMarqueeLinkSupported |
Specifies whether or not a long link can be displayed in one line, for example as a ticker tape. |
"true" or |
WML |
3 |
| isMarqueeTextSupported |
method isMarqueeTextSupported |
Specifies whether or not a long text can be displayed in one line, for example as a ticker tape. |
"true" or |
WML |
3 |
| getMaxLinkLength |
method getMaxLinkLength |
Returns the maximum size of the Href attributes of a link. |
1 |
||
| getMediaFormats |
method getMediaFormats |
Returns the list of multimedia formats supported – such as .agif (animated .gif format), .gif, .jpg, .png, .wbmp |
3 |
||
|
getMemory |
method getMemory |
Returns the maximum memory capacity of the device |
HTML |
||
|
getModel |
method getModel |
Returns the name of the device type – such as 7110 for the Nokia 7110 mobile telephone |
|||
| isNbspSupported |
method isNbspSupported |
Specifies whether or not the device supports non-breaking blank characters |
"true" or |
WML |
4 |
| isNestedTablesSupported |
method isNestedTablesSupported |
Specifies whether or not the browser supports nested tables |
"true" or |
HTML |
2 |
| isNewlineAfterImage |
method getNewlineAfterImage |
Specifies whether or not a line break is inserted automatically after an <img> tag. |
"true" or |
WML |
4 |
| isNewlineAfterInput |
method isNewlineAfterInput |
Specifies whether or not a line break is inserted automatically after an <input> tag on a specific mobile device. |
"true" or |
WML |
4 |
|
isNewlineAfterLink |
method getNewlineAfterLink |
Specifies whether or not a line break is inserted automatically after a link |
"true" or |
WML |
4 |
|
isNewlineAfterSelect |
method isNewlineAfterSelect |
Specifies whether or not a line break is inserted automatically after an <select> tag. |
"true" or |
WML |
4 |
| isNewlineBeforeImage |
method isNewlineBeforeImage |
Specifies whether or not a line break is inserted automatically before an <img> tag. |
"true" or |
WML |
4 |
| isNewlineBeforeInput |
method isNewlineBeforeInput |
Specifies whether or not a line break is inserted automatically before an <input> tag. |
"true" or |
WML |
4 |
| isNewlineBeforeLink |
method isNewlineBeforeLink |
Specifies whether or not a line break is inserted automatically before a link |
"true" or |
WML |
4 |
|
isNewlineBeforeSelect |
method isNewlineBeforeSelect |
Specifies whether or not a line break is inserted automatically before an <select> tag. |
"true" or |
WML |
4 |
| isNewlineBetweenImages |
method isNewlineBetweenImages |
Specifies whether or not a line break is inserted automatically after an <image> tag |
"true" or |
WML |
3 |
| isNewlineBetweenLinks |
method isNewlineBetweenLinks |
Specifies whether or not a line break is inserted automatically between two <image> tags |
"true" or |
WML |
4 |
| isNewlineBetwLinkAndTag |
method isNewlineBetwLinkAndTag |
Specifies whether or not a line break is inserted automatically between a link and a tag |
"true" or |
WML |
4 |
|
isOfflineBrowsingSupported |
method isOfflineBrowsingSupported |
Specifies whether or not the browser supports offline browsing through locally stored pages (that is, cached pages) |
"true" or |
HTML |
2 |
|
isOfflineFormsSuppported |
method isOfflineFormsSupported |
Specifies whether or not the browser allows the user to fill out input forms offline on the device |
"true" or |
HTML |
2 |
| getPageSizeMax |
method getPageSizeMax |
Returns the maximum page size that can be processed in a mobile device. |
2 |
||
| getPixelHeight |
method getPixelHeight |
Specifies the screen height in pixels. |
|||
| getPixelWidth |
method getPixelWidth |
Specifies the screen width in pixels. |
|||
|
isRedirAbsoluteSupported |
method isRedirAbsoluteSupported |
Specifies whether or not the browser supports the redirection of an absolute URL address. |
"true" or |
1 |
|
| isRedirRelativeSupported |
method isRedirRelativeSupported |
Specifies whether or not the browser supports the redirection of a relative URL address. |
"true" or |
2 |
|
| isScriptSupported |
method isScriptSupported |
Specifies whether or not the browser supports scripting |
"true" or |
2 |
|
|
getScriptVersion |
method getScriptVersion |
Returns the script version supported |
|||
|
isSecureProtocolsSupported |
method isSecureProtocolsSupported |
Specifies whether or not the browser supports SSL (Secure Socket Layer) or WTLS (Wireless Transport Layer Security) |
"true" or |
||
|
getSecureProtocolNames |
method getSecureProtocolsNames |
Returns the names of the security protocols supported The names are separated by semicolons |
|||
| isSelectionMenuSupported |
method isSelectionMenuSupported |
Specifies whether or not the menu layout type "selectionList" is supported |
"true" or |
WML |
4 |
|
isSetvarOnEventSupported |
method isSetvarOnEventSupported |
Specifies whether or not the <setvar> tag can be used within the <onevent type="onenterforward"> event handler |
"true" or |
WML |
1 |
| isSkippingToInput |
method isSkippingToInput |
Specifies whether or not the browser automatically skips to the first <input> tag and displays a screen extract around this tag |
"true" or |
WML |
4 |
|
isSmallSupported |
method isSmallSupported |
Specifies whether or not text can be formatted as "small" |
"true" or |
WML |
5 |
| getSoftkeyNum |
method getSoftkeyNum |
Returns the number of soft keys supported by the device |
WML |
3 |
|
| getSoftkeyStyle1 |
method getSoftkeyStyle1 |
Specifies how soft key 1 is displayed on the screen |
„notShown" |
WML |
5 |
| getSoftkeyStyle2 |
method getSoftkeyStyle2 |
Specifies how soft key 2 is displayed on the screen |
„notShown" |
WML |
5 |
| getSoftkeyTitleWidth |
method getSoftkeyTitleWidth |
Returns the number of displayed characters for a soft key title. |
WML |
3 |
|
|
isSoundSupported |
method isSoundSupported |
Specifies whether or not the device can play sounds |
"true" or |
HTML |
|
|
isStrongSupported |
method isStrongSupported |
Specifies whether or not text with the <strong>can be formatted as "highlighted" |
"true" or |
WML |
5 |
|
isSubmitOneventSupported |
method isSubmitOneventSupported |
Specifies whether or not "Submit" is supported within the <onevent type="onenterforward"> event handler |
"true" or |
1 |
|
| getSubCategory |
method getSubCategory |
Allows you to split devices into different sub-categories |
Any text |
||
| isTableHasBorders |
method isTableHasBorders |
Specifies whether or not tables are displayed with gridlines |
"true" or |
4 |
|
| isTableSupported |
method isTableSupported |
Specifies whether or not the browser supports tables with several columns |
"true" or |
3 |
|
| isTelephonyLinksSupported |
method isTelephonyLinksSupported |
Specifies whether or not a telephone can be dialed directly using a link |
"true" or |
4 |
|
|
isTextAlignmentSupported |
method isTextAlignmentSupported |
Specifies whether or not text within a paragraph can be aligned left, right, or centered |
"true" or |
WML |
5 |
| isTextStylesSupported |
method isTextStylesSupported |
Specifies whether or not the browser can format text using tags such as <b> or <small> |
"true" or |
WML |
5 |
| isTitleSupported |
method isTitleSupported |
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 |
WML |
3 |
| getTitleWidth |
method getTitleWidth |
Returns the maximum number of characters of the title |
3 |
||
|
isUnderlineSupported |
method isUnderlineSupported |
Specifies whether or not text can be formatted as "underlined" |
"true" or |
WML |
5 |
| getUserAgent |
method getUserAgent |
Equivalent to the HTTP request header "userAgent" |
|||
|
isVarsAcrossCardSupported |
method isVarsAcrossCardSupported |
Specifies whether or not browser variables passed to a card can also be used for different cards |
"true" or |
WML |
1 |
|
getVendor |
method getVendor |
Returns the manufacturer’s name |
|||
|
isXslSupported |
method isXslSupported |
Specifies whether or not the browser supports Extensible Stylesheet Language (XSL) |
"true" or |
HTML |
|
|
getXslVersion |
method getXslVersion |
Returns the XSL version supported |
HTML |
