Nokia-specific system properties

The table below defines the Nokia-specific system properties used by Series 40 devices.

Table: Nokia system properties

System property

Description

Series 40 release

Value

com.nokia.gpu.memory.total

Returns the total amount of graphics memory available on the device in bytes.

   

com.nokia.gpu.memory.used

Returns the amount of allocated graphics memory on the device in bytes.

   

com.nokia.gpu.memory.shared

Returns the amount of shared memory used by the application (MIDlet) process in bytes.

Shared memory is allocated for objects that can be used by multiple processes on a device.

   

com.nokia.gpu.memory.private

Returns the amount of private memory used by the application (MIDlet) process in bytes.

Private memory is allocated to objects that can only be used by a specific process on a device.

   

com.nokia.memoryramfree

This can be used to query the available RAM in the operating system.

This is a more realistic estimate of available RAM on the device than what is returned by Runtime.getRuntime().freeMemory(), which returns only free memory in the Java virtual machine.

   

com.nokia.mid.calendars

Returns the database names of all the calendars available on the device.

For more information about calendars, see the following sections:

 

Returns the database names of the calendars. The names are separated by commas.

com.nokia.mid.dateformat

The preferred date format indicated as a string pattern, which is formatted according to the rules defined in Java 2, Standard Edition, version 1.4.1, java.text.SimpleDateFormat class documentation for date patterns.

Series 40 3rd Edition

 

com.nokia.mid.timeformat

The preferred time format indicated as a string pattern, which is formatted according to the rules defined in Java Standard Edition, version 1.4.1, java.text.SimpleDateFormat class documentation for time patterns.

Series 40 3rd Edition

hh:mm a

com.nokia.mid.ui.customfontsize

Returns true if the device supports the DirectUtils.getFont method, which is used for creating fonts with a custom height. Otherwise, returns false.

Java Runtime 1.0.0 for Series 40

 

com.nokia.mid.ui.frameanimator.fps

Default platform value for maximum frames per second (fps). This can be used when specifying the maximum fps for a linear drag or kinetic scroll animation.

Series 40 6th Edition Feature Pack 1

Returns the default maximum fps as a short integer.

com.nokia.mid.ui.frameanimator.pps

Default platform value for maximum pixels per second (pps). This can be used when specifying the maximum pps for a kinetic scroll animation.

Series 40 6th Edition Feature Pack 1

Returns the default maximum pps as a short integer.

com.nokia.mid.ui.screensaverprevention

Returns true if the device supports the DeviceControl.resetUserInactivityTime method, which can be used for preventing the screen saver from starting. Otherwise, returns false.

Java Runtime 2.0.0 for Series 40

 

com.nokia.mid.ui.tactilefeedback

Returns always false since Series 40 and Nokia Asha software platform devices only support a stub implementation of the com.nokia.mid.ui.TactileFeedback class.

Java Runtime 2.0.0 for Series 40

 

com.nokia.mid.batterylevel

The battery charge level of the device.

Java Runtime 1.0.0 for Series 40

Returns the percentage value of the battery charge level.

com.nokia.network.access

Network access type of used active connection or a set default access point.

Series 40 3rd Edition

pd - Packet data in GSM network

pd.EDGE - Packet data in EDGE network

pd.3G - Packet data in 3G network

pd.HSDPA - High speed downlink packet access for 3G networks

csd - Circuit switched data, for example GSM CSD/HSCSD data call

bt_pan - Bluetooth PAN network

wlan - Wireless network, for example 802.11b, 802.11G or WiMaX

na - Not applicable, the implementation can’t determine the type

com.nokia.midp.impl.isa.network.databearer

Returns the type of GPRS support.

Series 40 5th Edition Feature Pack 1

Possible values include, for example:

  • GPRS

  • EGPRS

  • GPRS over UMTS

com.nokia.dir.name:xxxx

Returns the localized name of the specified directory as it is displayed in the device UI. The directory must be specified with its full path.

For example, on a device whose display language is set to English, the localized UI name of C:\\predefjava\\predefgames (default games directory) is returned as Games (as displayed in the applications menu).

Series 40 5th Edition Feature Pack 1

For example:

String gameFolderName = System.getProperty("com.nokia.dir.name: C:\\predefjava\\predefgames")

com.nokia.mid.countrycode

Current network country code.

Security prompting behaves according to Location function group settings.

Java Runtime 1.0.0 for Series 40

Returns the mobile country code defined in ITU-T Recommendation E.212.

com.nokia.multisim.countrycode.sim1 and com.nokia.multisim.countrycode.sim2

Current network country code for SIM1 or SIM2.

Note: This property is available only on dual-SIM devices.

Java Runtime 1.0.0 for Series 40

Returns the mobile country code defined in ITU-T Recommendation E.212.

com.nokia.mid.networkid

Network identification parameters (Network Identification Number (NID) in CDMA and Mobile Network Code (MNC) in GSM) and network short name.

Security prompting behaves according to Location function group settings.

Note: From Series 40 3rd Edition Feature Pack 1 to Series 40 6th Edition Feature Pack 1, this property is available only in the manufacturer and operator domains. From Java Runtime 1.0.0 for Series 40 onwards, this property is available in all domains.

Series 40 3rd Edition Feature Pack 1

Returns two values:

  • Network ID

  • Network short name

For a list of possible values, see list of MNCs

com.nokia.multisim.networkID.sim1 and com.nokia.multisim.networkID.sim2

Network identification parameters (Network Identification Number (NID) in CDMA and Mobile Network Code (MNC) in GSM) and network short name for SIM1 or SIM2.

Security prompting behaves according to Location function group settings.

Note: This property is available only on dual-SIM devices.

Java Runtime 1.0.0 for Series 40

Returns two values:

  • Network ID

  • Network short name

For a list of possible values, see list of MNCs

com.nokia.mid.cellid

On 2G devices, returns identity of the cell from which a mobile telephony call was made or received.

On 3G devices, returns UC-ID (UTRAN ID) value, which is a combination of Radio Network Controller ID (RNC-ID) and cell ID.

Security prompting behaves according to Location function group settings.

Note: From Series 40 5th Edition Feature Pack 1 to Series 40 6th Edition Feature Pack 1, this property is available only in the manufacturer and operator domains. From Java Runtime 1.0.0 for Series 40 onwards, this property is available in all domains.

Series 40 5th Edition Feature Pack 1

 

com.nokia.multisim.cellid.sim1 and com.nokia.multisim.cellid.sim2

On 2G devices, returns identity of the cell from which a mobile telephony call was made or received.

On 3G devices, returns UC-ID (UTRAN ID) value, which is a combination of Radio Network Controller ID (RNC-ID) and cell ID.

Security prompting behaves according to Location function group settings.

Note: These properties are available only on dual-SIM devices.

Note: Nokia SDK for Java provides compile time support for these properties, but no simulation support. So, the return value for these properties is always zero in Nokia SDK for Java.

Java Runtime 1.0.0 for Series 40

 

com.nokia.mid.lac

Returns current GSM location area code (LAC) as a string. The SIM card must be inserted and service acquired in order to return a LAC value, otherwise returns null.

This value applies only to 2G devices.

Security prompting behaves according to Location function group settings

Note: From Series 40 5th Edition Feature Pack 1 to Series 40 6th Edition Feature Pack 1, this property is available only in the manufacturer and operator domains. From Java Runtime 1.0.0 for Series 40 onwards, this property is available in all domains.

Series 40 5th Edition Feature Pack 1

 

com.nokia.multisim.lac.sim1 and com.nokia.multisim.lac.sim2

Returns current GSM location area code (LAC) as a string for SIM1 or SIM2. The SIM card must be inserted and service acquired in order to return a LAC value, otherwise returns null.

This value applies only to 2G devices.

Security prompting behaves according to Location function group settings

Note: These properties are available only on dual-SIM devices.

Java Runtime 1.0.0 for Series 40

 

com.nokia.mid.impl.nativeDigitSupport

Returns the setting from a user menu option elsewhere in the phone software.

Series 40 5th Edition Feature Pack 1

 

com.nokia.mid.ui.layout

Returns layout alignment.

Series 40 6th Edition Feature Pack 1

Returns the string ltr, if the native layout is left-to-right aligned. Returns the string rtl if the native layout if right-to-left aligned.

com.nokia.mid.ui.version

Returns the Overview of Nokia Notifications API supported by the device.

Java Runtime 2.0.0 for Series 40

<X.X>

For example:

1.6

com.nokia.mid.settings.ombActive

Whether Ovi Messaging Bus (OMB) is enabled or disabled.

Note: This property is available only in the manufacturer and operator domains.

Series 40 6th Edition Feature Pack 1

Returns the string On if the user has enabled OMB. Returns the string Off if the user has disabled OMB.

com.nokia.mid.networkstatus

Whether the device is in the home network or currently roaming.

Java Runtime 1.0.0 for Series 40

Possible values:

  • home - The device is in the home network.

  • roaming - The device is roaming.

  • unknown - The status of the network is unknown.

com.nokia.mid.networkavailability

Network availability.

Java Runtime 1.0.0 for Series 40

available or unavailable

com.nokia.mid.networksignal

Current (GSM/CDMA) network signal strength.

The output format is as follows: <the number of bars the phone should display>(<the signal strength in dBm> dBm)

Java Runtime 1.0.0 for Series 40

Returns two values:

  • The number of bars the phone should display

  • The signal strength in dBm

com.nokia.multisim.networkstatus.sim1 and com.nokia.multisim.networkstatus.sim2

The network status (home, roaming, or unknown) for SIM1 or SIM2.

Note: These properties are available only on dual-SIM devices.

Note: These properties are not supported in Nokia SDK for Java.

Java Runtime 1.0.0 for Series 40

Possible values:

  • home - The device is in the home network.

  • roaming - The device is roaming.

  • unknown - The status of the network is unknown.

com.nokia.multisim.networkavailability.sim1 and com.nokia.multisim.networkavailability.sim2

Network availability for SIM1 or SIM2.

Note: These properties are available only on dual-SIM devices.

Java Runtime 1.0.0 for Series 40

available or unavailable

com.nokia.multisim.networksignal.sim1 and com.nokia.multisim.networksignal.sim2

Current (GSM/CDMA) network signal strength for SIM1 or SIM2.

The output format is as follows: <the number of bars the phone should display>(<the signal strength in dBm> dBm)

Note: These properties are available only on dual-SIM devices.

Java Runtime 1.0.0 for Series 40

Returns two values:

  • The number of bars the phone should display

  • The signal strength in dBm

com.nokia.mid.imei

The International Mobile Equipment Identity (IMEI) of the device.

Note: From Series 40 3rd Edition Feature Pack 1 to Series 40 6th Edition Feature Pack 1, this property is available only in the manufacturer and operator domains. From Java Runtime 1.0.0 for Series 40 onwards, this property is available in all domains.

Series 40 3rd Edition Feature Pack 1

Returns a 14 digit decimal number that uniquely identifies the device.

com.nokia.mid.imsi

The International Mobile Subscriber Identity (IMSI) stored in the SIM card.

Note: The access to this system property is limited with com.nokia.mid.Mobinfo.IMSI permission. By default, this permission is available only in manufacturer and operator domain.

Note: In Series 40, this property is available only in the manufacturer and operator domains.

Series 40 3rd Edition Feature Pack 1

Returns the subscriber number associated with the device. The IMSI number is usually 14 decimal digits long, but it may be shorter.

com.nokia.mid.spn

Returns service provider name (if available on SIM).

Note: In Series 40, this property is available only in the manufacturer and operator domains.

Series 40 3rd Edition Feature Pack 1

Returns "" if not available, and null if the API is not supported.

com.nokia.mid.mnc

Returns the Mobile Country Code (MCC) and Mobile Network Code (MNC).

Note: From Series 40 3rd Edition Feature Pack 1 to Series 40 6th Edition Feature Pack 1, this property is available only in the manufacturer and operator domains. From Java Runtime 1.0.0 for Series 40 onwards, this property is available in all domains.

Series 40 3rd Edition Feature Pack 1

Returns the MCC and MNC as a 4 to 6 digit string (depending on operator).

com.nokia.multisim.mnc.sim1 and com.nokia.multisim.mnc.sim2

Returns the Mobile Country Code (MCC) and Mobile Network Code (MNC) for SIM1 or SIM2.

Note: These properties are available only on dual-SIM devices.

Java Runtime 1.0.0 for Series 40

Returns the MCC and MNC as a 4 to 6 digit string (depending on operator).

com.nokia.multisim.mmsc.sim1 and com.nokia.multisim.mmsc.sim2

Returns MMSC on devices with JSR205 implemented for SIM1 or SIM2.

Note: These properties are available only on dual-SIM devices.

Java Runtime 1.0.0 for Series 40

 

com.nokia.multisim.smsc.sim1 and com.nokia.multisim.smsc.sim2

Returns the SMS message centre number for SIM1 or SIM2.

Note: These properties are available only on dual-SIM devices.

Java Runtime 1.0.0 for Series 40

 

com.nokia.mid.ons

Returns operator name.

Note: In Series 40, this property is available only in the manufacturer and operator domains.

Series 40 3rd Edition Feature Pack 1

Returns operator name as string.

com.nokia.mid.gid1

Returns Group Identifier level 1 (GID1).

Note: This property is available only in the manufacturer and operator domains.

Series 40 6th Edition

The structure of GID1 and GID2 are identical. They are provided to allow the network operator to enforce different levels of security dependant on application.

com.nokia.mid.gid2

Returns Group Identifier level 2 (GID2).

Note: This property is available only in the manufacturer and operator domains.

Series 40 6th Edition

The structure of GID1 and GID2 are identical. They are provided to allow the network operator to enforce different levels of security dependant on application.

com.nokia.mid.msisdn

The Mobile Station International Subscriber Directory Number (MSISDN) stored in the SIM card.

Note: In Series 40, this property is available only in the manufacturer and operator domains.

Series 40 6th Edition

Returns all MSISDN numbers stored in the SIM separated by blank (Unicode U+0020). One MSISDN number is usually maximized to 15 decimal digits.

Note: SIM cards do not necessarily contain a single MSISDN. If none are present, com.nokia.mid.msisdn returns null.

com.nokia.canvas.net.indicator.location

Indicates the area covered by the networking indicator in full-screen mode Canvas.

 

x,y,width,height

Used only when Canvas in full-screen mode and set as the current Displayable. Otherwise returns null.

com.nokia.softkey1.label.location, com.nokia.softkey2.label.location and com.nokia.softkey3.label.location

Indicates the position of the left (1), right (2) and middle (3) softkey labels, respectively.

 

x,y,width,height

Used only when Canvas in full-screen mode and set as the current Displayable. Otherwise returns null.

For an example on using softkey labels, see section Setting softkey label location.

com.nokia.softkey1.label.anchor, com.nokia.softkey2.label.anchor and com.nokia.softkey3.label.anchor

Indicates the alignment of the left (1), right (2) and middle (3) softkey labels, respectively.

 

Used only when Canvas in full-screen mode and set as the current Displayable.

The value is the combined (bitwise OR) values of anchor points as defined in MIDP specification in javax.microedition.lcdui.Graphics. The anchor point values are presented in decimal as Unicode digits.

Otherwise returns null.

For an example on using softkey labels, see section Setting softkey label location.

com.nokia.mid.cmdline

A parameter can be mapped to a value (param=value) or it can itself represent a boolean value, for example silent or WizardMode. In the latter case, getProperty returns an empty string ("") for the parameter.

 

param1=value1;param2=value2;param3=value3;param4

com.nokia.mid.cmdline.instance

Returns the number of times the MIDlet has been launched.

 

An incremental number of times the MIDlet has been launched.

The com.nokia.mid.timeformat and com.nokia.mid.dateformat system properties indicate the user preferences of date and time formats. For example, on many devices there are settings available for the user to indicate the date and time formatting settings: ordering of date, month and year components of date strings, separators used between components of date and time strings, whether 12 or 24 hour clock is used, and so on. The values of the above system properties indicate the currently active user preferences for these settings. MIDlets can use these values, for example, to format date and time strings they need to display in the user interface.

System properties for keypad settings

The following system properties are supported in Series 40 devices:
Table: Nokia system properties for keypads

System property

Description

Series 40 Release

Value

com.nokia.keyboard.type

Gives the type of physical device keyboard as a string.

Series 40 6th Edition Feature Pack 1

Returns a variety of potential values. For full details, see table Return values for key type.

com.nokia.key.scancode

Returns the scan code of last pressed key. For further usage, the return value can be converted using the Integer.parseInt method.

Series 40 6th Edition Feature Pack 1

Scan codes are device keyboard driver specific.

From Series 40 6th Edition Lite onwards, the system property handles QWERTY keyboards.

com.nokia.key.modifier

Returns modifier value of last pressed key. For further usage, the return value can be converted using the Integer.parseInt method.

 

Returns a variety of potential values. For full details, see table Return values for com.nokia.key.modifier.

The return value can carry multiple modifier flags. Bitwise AND comparison between modifier value and mask (from table) can be used to find out which modifier keys were pressed.

Table: Return values for com.nokia.keyboard.type

Keyboard layout

String value

No keypad (for example a touch device without keypad)

None

Standard ITU-T keypad (Phone keypad with 12 keys)

PhoneKeypad

QWERTY (4x12 layout)

FullKeyboard

QWERTY (limited, 4x10 layout)

LimitedKeyboard4x10

QWERTY (limited, 3x11 layout)

LimitedKeyboard3x11

Half QWERTY layout (also known as Compact QWERTY keyboard) layout.

Note: In half QWERTY layout, a single key is used to input more than one character. This kind of text input requires the use of tapping or predictive input methods similar to Standard ITU-T keypad (PhoneKeypad)

HalfKeyboard

Custom QWERTY layout

Custom

Unknown layout

Unknown

Table: Return values for com.nokia.key.modifier

Modifier key

String value (decimal form)

HEX value

Left Shift

1280

0x00000500

Right Shift

1536

0x00000600

Left Ctrl

160

0x000000A0

Right Ctrl

192

0x000000C0

Fn

12288

0x00003000

Chr

10240

0x00002800

Example

The following example shows you how to use the system properties from the above tables. This example contains code snippets that are inserted in various parts of the target MIDlet. The used Canvas is assumed to have the name TestCanvas.

First, declare the initial variables and constants. The first six values are from table Return values for com.nokia.key.modifier.
private static final int LSHIFT = 0x00000500;
private static final int RSHIFT = 0x00000600;
private static final int LCTRL  = 0x000000A0;
private static final int RCTRL  = 0x000000C0;
private static final int FN     = 0x00003000;
private static final int CHR    = 0x00002800;

int keyCode;
int keyScanCode = 0;
int keyModifiers = 0;
String keyboard = “”;
String modifier = “”;
To process the output values from the system properties, insert the following lines into the keyPressed method:
this.keyCode = 0;
this.keyScanCode = 0;
this.keyModifiers = 0;
        
this.keyCode = keyCode; //keyCode is argument of keyPressed method
        
try {
	this.keyScanCode = Integer.parseInt(System.getProperty("com.nokia.key.scancode"));
	this.keyModifiers = Integer.parseInt(System.getProperty("com.nokia.key.modifier"));
}
	catch (NumberFormatException e) {
	e.printStackTrace();
}
     
//if keyModifiers value contains some of modifier bits, 
//name of corresponding key is added to modifier string  
this.modifier = "";
this.modifier += ((this.keyModifiers & TestCanvas.LSHIFT) == TestCanvas.LSHIFT) ? "LSHIFT " : ""; 
this.modifier += ((this.keyModifiers & TestCanvas.RSHIFT) == TestCanvas.RSHIFT) ? "RSHIFT " : "";
this.modifier += ((this.keyModifiers & TestCanvas.FN) == TestCanvas.FN) ? "FN " : "";
this.modifier += ((this.keyModifiers & TestCanvas.CHR) == TestCanvas.CHR) ? "CHR " : "";
        
this.keyboard = System.getProperty("com.nokia.keyboard.type");

To print the current values on screen, add the following lines inside the paint method:

g.setColor(0xffffffff);
g.fillRect(0, 0, this.getWidth(), this.getHeight());
        
Font f = g.getFont();
        
g.setColor(0xff000000);
        
g.drawString("Keyboard: " + this.keyboard, 0, 0 + f.getHeight()*0, Graphics.TOP | Graphics.LEFT);
g.drawString("Key code: " + this.keyCode, 0, 0 + f.getHeight()*1, Graphics.TOP | Graphics.LEFT);
g.drawString("Scan code: " + this.keyScanCode, 0, 0 + f.getHeight()*2, Graphics.TOP | Graphics.LEFT);
g.drawString("Modifier: " + this.keyModifiers, 0, 0 + f.getHeight()*3, Graphics.TOP | Graphics.LEFT);
g.drawString("Modifiers: " + this.modifier, 0, 0 + f.getHeight()*4, Graphics.TOP | Graphics.LEFT);
g.drawString("Character: " + (char)this.keyCode, 0, 0 + f.getHeight()*5, Graphics.TOP | Graphics.LEFT);