Help Center

Local Navigation

Object: Navigator

Availability

BlackBerry® Device Software version 3.8 or later

The Navigator object provides information about the version of the BlackBerry® Browser that is being used. All its properties, which are read-only, contain information about different aspects of the browser.

Navigator properties

Property name

Type

Description

Status

Support level

Availability

appCodeName

DOMString

Returns the code name of the browser. The value is typically BlackBerry, but may be different if the user has selected an emulation mode other than "BlackBerry".

read only

Not part of any standard

3.8 or later

appName

DOMString

Returns the name of the browser. In the case of the BlackBerry® Browser, the value is always BlackBerry.

read only

Not part of any standard

3.8 or later

appVersion

DOMString

Returns the version of the BlackBerry® Device Software that is running on the BlackBerry device (for example, 4.6.0).

read only

Not part of any standard

3.8 or later

buildID

DOMString

Returns the build identifier of the version of the BlackBerry Device Software running on the device.

read only

Not part of any standard

4.6 or later

cookieEnabled

boolean

Returns true if cookies are enabled in the BlackBerry Browser.

read only

Not part of any standard

4.6 or later

geolocation

Geolocation

Returns the location information associated with the hosting device

read only

HTML 5

6.0 or later

language

DOMString

Returns the two-letter language code (for example, de, en, or ja) that represents the default language translation of the BlackBerry Browser.

read only

Not part of any standard

3.8 or later

mimeTypes

MimeTypeArray

Returns a list of the MIME types that the target BlackBerry Browser supports.

read only

Not part of any standard

3.8 or later

onLine

boolean

When true, indicates that the device is currently online. This attribute is used in conjunction with offline applications.

read only

HTML 5

6.0 or later

platform

DOMString

Returns BlackBerry. This property is treated as a constant.

read only

Not part of any standard

3.8 or later

plugins

PluginArray

Returns a list of the embedded plugins in the document.

read only

Not part of any standard

4.6 or later

userAgent

DOMString

Returns the user agent from the user-agent header of the HTTP header. The user agent is used to identify the client browser.

On BlackBerry devices running BlackBerry Device Software 5.0 or earlier, the userAgent string is:

BlackBerry<model>/<version> Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/109

On BlackBerry devices running BlackBerry Device Software 6.0 or later, the userAgent string is:

Mozilla/5.0 (BB<model>; U; BlackBerry <version>; <lang>) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17

where

  • <model> is the BlackBerry device model on which the browser is running, for example 8130 or 9000
  • <version> is the version of the BlackBerry Device Software the BlackBerry device is running
  • <lang> is the default language of the specified BlackBerry Device Software

read only

Not part of any standard

3.8 or later

Navigator methods

Method name

Description

Availability

javaEnabled()

Tests whether the browser supports Java® or not.

3.8 or later

Method: navigator.javaEnabled()

Availability

BlackBerry® Device Software version 3.8 or later

The javaEnabled() method tests whether the browser supports Java® or not.

Syntax

navigator.javaEnabled()

Parameters

None.

Return values

In the case of the BlackBerry® Browser, always returns a value of false.

Exceptions

None.

Examples

The following code fragment runs the function doThis if Java is supported otherwise, it runs the function doThat:

if (navigator.javaEnabled()) {
   doThis();
}
else doThat();
Next topic: Object: Plugin

Was this information helpful? Send us your comments.