×
Namespaces

Variants
Actions

Getting System properties in MIDP

From Nokia Developer Wiki
Jump to: navigation, search

Contents

Article Metadata
Code ExampleCompatibility
Platform(s):
MIDP 2.0
MIDP 1.0
Article
Created: User:Technical writer 1 (November 30, 2005; updated December 7, 2007)
Last edited: 2008gala (14 Jul 2014)

Description

This document lists system properties that can be retrieved by using the System.getProperty() method call. The File:SystemProperties.zip related to this article can be used for checking the system properties that devices support.

If a system property string returns "null", the feature is not supported. Some of the system properties might return "null" even if the related API is supported. This is because the listed system properties include properties which are listed in the Mobile Service Architecture (JSR-248) specification. For example, the Series 40 3rd Edition, FP2 devices have SATSA-APDU package (JSR-177), but the "microedition.satsa.apdu.version" system property returns "null".

CLDC 1.0 & 1.1, MIDP 1.0 & 2.0, and JTWI 1.0

String Description
microedition.profiles For MIDP 2.0 devices, this property MUST contain at least "MIDP-2.0".
microedition.configuration
The J2ME configuration supported by this device.
For example, "CLDC-1.0".
microedition.locale
The name of the current locale on this device.
For example, "en-US".
microedition.platform The name of the host platform or device. In Nokia devices the name consists of "Nokia", the device model, and software version separated by "/". There is no space between "Nokia" and the model number nor on either side of "/". Formally, the syntax of the platform string is: Nokia MODEL_NUMBER "/" SW_VERSION.
For example, "Nokia6310i/4.42 or Nokia3510i/p1.25".
microedition.encoding Returns the platform's default character encoding. In Nokia devices this value is "ISO-8859-1".
microedition.commports A comma-separated list of ports is returned which can be combined with a comm: prefix as the URL string to be used to open a serial port connection.
microedition.hostname Defined in MIDP 2.0 javax.microedition.io.SocketConnection getLocalAddress() method. Returns the local hostname, if it is available.
microedition.jtwi.version To identify a compliant device and the implemented version of this specification, the value of the system property microedition.jtwi.version must be "1.0".
microedition.msa.version Version number of the supported MSA Specification, the possible values are "1.0" or "1.0-SUBSET" for implementations conforming to this specification.


Package discovery

String Description
microedition.media.version If the optional package is supported, a version string is returned. Otherwise "null".
microedition.pim.version If the optional package is supported, a version string is returned. Otherwise "null".
microedition.m3g.version If the optional package is supported, a version string is returned. Otherwise "null".
microedition.location.version If the optional package is supported, a version string is returned. Otherwise "null".
bluetooth.api.version If the optional package is supported, a version string is returned. Otherwise "null".
microedition.io.file.FileConnection.version If the optional package is supported, a version string is returned. Otherwise "null".
microedition.global.version If the optional package is supported, a version string is returned. Otherwise "null".
microedition.chapi.version If the optional package is supported, a version string is returned. Otherwise "null".
microedition.sip.version If the optional package is supported, a version string is returned. Otherwise "null".
wireless.messaging.version If the optional package Wireless Messaging API (JSR-120/205) is supported, a version string is returned. Otherwise "null".
microedition.amms.version If the optional package Advanced Multimedia Supplements (JSR-234) is supported, a version string is returned. Otherwise "null".
microedition.m2g.version If the optional package Scalable 2D Vector Graphics API for J2ME (JSR-226) is supported, a version string is returned. Otherwise "null".
microedition.payment.version If the optional package Payment API (JSR-229) is supported, a version string is returned. Otherwise "null".
microedition.contactless.version If the optional package Contactless Communication API (JSR-257) is supported, a version string is returned. Otherwise "null".
microedition.sensor.version If the optional package Mobile Sensor API (JSR-256) is supported, a version string is returned. Otherwise "null".
obex.api.version If the optional package Object Exchange Protocol (OBEX) API (JSR-82) is supported, a version string is returned. Otherwise "null".


Mobile Media API (JSR-135)

String Description
supports.mixing
A query for whether audio mixing is supported. The string returned is either "true" or "false". If mixing is supported, the following conditions are true:
  • At least two tones can be played with Manager.playTone simultaneously.
  • Manager.playTone can be used at the same time when at least one Player is playing back audio.
  • At least two Players can be used to play back audio simultaneously.
supports.audio.capture
A query for whether audio capture is supported. The string returned is either "true" or "false".
supports.video.capture A query for whether video capture is supported. The string returned is either "true" or "false".
supports.recording
A query for whether recording is supported. The string returned is either "true" or "false".
audio.encodings The string returned specifies the supported capture audio formats. Each format is specified in a special syntax. The formats are delimited by at least one space. For example, "{{{1}}}".
video.encodings
The string returned specifies the supported capture video formats. Each format is specified in a special syntax. The formats are delimited by at least one space. For example, "{{{1}}}".
video.snapshot.encodings
Supported video snapshot formats for the getSnapshot method in VideoControl. The string returned specifies the supported capture image formats. Each format is specified in a special syntax. The formats are delimited by at least one space. For example, "{{{1}}}".
streamable.contents Returns formats that can be streamed (i.e., playing can be started before the whole content is loaded to the memory). Returns "null" if streamable formats do not exist. No formats support streaming at the moment.

Wireless Messaging API (JSR-120, JSR-205)

String Description
wireless.messaging.sms.smsc The address of the SMS expressed using the syntax expressed by the msisdn item of the following BNF definition:
{{{1}}}
wireless.messaging.mms.mmsc Returns the address of the MMSC on devices with JSR-205 implemented.


FileConnection API (JSR-75)

String Description
fileconn.dir.photos
This points to the directory where photos captured with an integrated camera or other images are stored. For example, "file:///c:/My files/Images/".
fileconn.dir.videos
The same as the previous entry but with reference to videos. Downloaded videos are also stored here by default. For example, "file:///c:/My files/Video clips/".
fileconn.dir.tones
Ring tones and other similar audio files are stored in this directory. For example, "file:///c:/My files/Tones/".
fileconn.dir.memorycard Root directory of a memory card in case it is available. For example, "file:///d:/".
fileconn.dir.private
Private work directory of MIDlet suite. For example, "file:///c:/System/MIDlets/[1015f294]/scratch".
fileconn.dir.photos.name Localized UI name for the photos directory. For example, "Images".
fileconn.dir.videos.name Localized UI name for the videos directory. For example, "Video clips".
fileconn.dir.tones.name Localized UI name for the sounds directory. For example, "Sound clips".
file.separator File separator character. In Nokia devices: "/".
fileconn.dir.memorycard.name Localized UI name for the memory card directory. For example, "Memory card".


Java™ APIs for Bluetooth Wireless Technology (JSR-82)

Note: With the Bluetooth API, the LocalDevice.getProperty() method should be used to retrieve system properties; for example: LocalDevice.getProperty("bluetooth.connected.devices.max")


String Description
bluetooth.l2cap.receiveMTU.max This points to the directory where photos captured with an integrated camera or other images are stored.
bluetooth.connected.devices.max The maximum number of connected devices supported (will include parked devices). The string will be in Base10 digits.
bluetooth.connected.inquiry Is inquiry allowed during a connection? Valid values are "true" and "false".
bluetooth.connected.page Is paging allowed during a connection? Valid values are "true" and "false".
bluetooth.connected.inquiry.scan Is inquiry scanning allowed during a connection? Valid values are "true" and "false".
bluetooth.connected.page.scan Is page scanning allowed during a connection? Valid values are "true" and "false".
bluetooth.master.switch Is master/slave switch allowed? Valid values are "true" and "false".
bluetooth.sd.trans.max Maximum number of concurrent service discovery transactions. The string will be in Base10 digits.
bluetooth.sd.attr.retrievable.max Maximum number of service attributes to be retrieved per service record. The string will be in Base10 digits.


Scalable 2D Vector Graphics API (JSR-226)

String Description
microedition.m2g.svg.version The version of SVG that is supported by the underlying implementation. For example, if the underlying SVG engine conforms to the W3C SVGT 1.1 specification, the returned string is "1.1", and for SVGT 1.2 it is "1.2", and so on.
microedition.m2g.svg.baseProfile The base profile of SVG that is supported by the underlying implementation. It is "tiny" for JSR-226 v1.0 implementations.


Mobile 3D Graphics API for J2ME™ (JSR-184)

The Mobile 3D Graphics API properties can be queried with the Graphics3D.getProperties() method. It returns a HashTable of the properties and their values. Properties "maxViewportWidth" and "maxViewportHeight" were added in M3G 1.1, in case of M3G 1.0 this MIDlet returns "null" for these properties. Property "m3gRelease" is not mandated by the specification, but it is an implementation-specific property.

The example values are from an S60 3rd Edition device. See the JSR-184 specification for more information about the details of 3D graphics. The specification is available at Nokia Developer - JSR-184.

String Description
supportAntialiasing Returns "true" if antialiasing is supported, otherwise "false". For example, "false".
supportTrueColor Returns "true" if true color rendering is supported, otherwise "false". For example, "false".
supportDithering Returns "true" if dithering is supported, otherwise "false". For example, "false".
supportMipmapping Returns "true" if mipmapping is supported, otherwise "false". See Texture2D class description in JSR-184 specification for more information. For example, "true".
supportPerspectiveCorrection Returns "true" if perspective correction is supported, otherwise "false". See PolygonMode class description in JSR-184 specification for more information. For example, "true".
supportLocalCameraLighting Returns "true" if local camera lightning is supported, otherwise "false". See PolygonMode class description in JSR-184 specification for more information. For example, "false".
maxLights Returns the maximum value of light sources. Minimum requirement for this is 8. See Light class description in JSR-184 specification for more information. For example, "8".
maxViewportWidth Returns the maximum value of viewport width. Minimum requirement for this is 256. See Graphics3D.setViewport() method description in JSR-184 specification for more information. For example, "null".
maxViewportHeight Returns the maximum value of viewport height. Minimum requirement for this is 256. See Graphics3D.setViewport() method description in JSR-184 specification for more information. For example, "null".
maxViewportDimension Returns the minimum of {maxViewportWidth, maxViewportHeight}. Minimum requirement for this is 256. For example, "1024".
maxTextureDimension Returns the maximum allowed size for a texture image. This is specific to each implementation. Minimum requirement for this is 256. See Texture2D class description in JSR-184 specification for more information. For example, "256".
m3gRelease Returns the release date for the JSR-184 implementation. For example, "04_wk49".
maxSpriteCropDimension
Returns the maximum crop rectangle size. The minimum requirement for this is 256. See Sprite3D class description in JSR-184 specification for more information. For example, "256".
numTextureUnits Returns the amount of texture units supported by the device. The minimum requirement for this is 1. See Appearance class description in JSR-184 specification for more information. For example, "2".
maxTransformsPerVertex Returns an implementation defined limit to the number of bones (bone = a node in the skeleton group to transform the vertices with) that can have an effect on any single vertex. The minimum requirement for this is 2. See SkinnedMesh class description in JSR-184 specification for more information. For example, "4".


Security and Trust Services API (SATSA) for Java™ 2 Platform, Micro Edition (JSR-177)

String Description
microedition.smartcardslots Indicates the names of the smart card slots. The value returned is a comma-separated list of the smart card slots which can be used in the Connector.open() string to identify the specific smart card slot.
A typical configuration for a cold-swappable SIM card and a hot-swappable removable card would be
0C,1H.
microedition.satsa.apdu.version Version of the SATSA-APDU API supported by the device. For example, "1.0".
microedition.satsa.crypto.version Version of the SATSA-CRYPTO API supported by the device. For example, "1.0".
microedition.satsa.pki.version Version of the SATSA-PKI API supported by the device. For example, "1.0".


Location API for J2ME™ (JSR-179)

String Description
fileconn.dir.landmarks Returns the location of JSR-179 landmarks store in the file system.
fileconn.dir.landmarks.name Returns localized name for the landmarks store.


Advanced Multimedia Supplements API (JSR-234)

String Description
supports.mediacapabilities The String returned specifies the supported capabilities, delimited by one whitespace (Unicode U+0020). At least one of the possible values MUST be returned. The possible values are:
music
audio3d
imageencoding
imagepostprocessing
camera
tuner
tuner.modulations The String returned specifies the supported tuner modulation settings for which a Player can be created. Returned modulations are delimited by one whitespace (Unicode U+0020). If no modulations are supported, the tuner.modulations returns "null".
TunerControl specifies the following constants, but supported modulations are not limited to these:
fm for FM audio radio
am for AM audio radio
audio.samplerates The String returned specifies the recommended audio sampling rates in Hertzs, delimited by one whitespace (Unicode U+0020). Other sampling rates might be supported as well, but these are recommended. If the audio output is not supported, the audio.samplerates returns "null".
audio3d.simultaneouslocations The String returned specifies the maximum number of SoundSource3D modules that the application is recommended to have active simultaneously in a typical game-playing situation when graphics rendering (2D or 3D) and reverberation are also taking place. A SoundSource3D module is active when it contains one or more Players in the PREFETCHED or STARTED states. The implementation does not guarantee that this number of SoundSource3Ds may be active simultaneously under all conditions; it is just a hint to the application. (It may even be possible for more than this number of SoundSource3Ds to be active simultaneously, but this is not guaranteed either.)
The number returned presumes that every active SoundSource3D has exactly one Player, and that the Player's content type is a monophonic linear WAV with a sample rate of 16 kHz and 16 bits per sample.
camera.orientations The String returned specifies the orientations of the cameras of the device. The String consists of orientations per device, delimited by one whitespace (Unicode U+0020). The String for orientation has the format device_name: orientation without whitespace characters.
An example of a returned String: "devcam0:outwards devcam1:inwards".
The orientation values can be the following:
inwards (the camera is pointing towards the user when the device is held in a natural way.)
outwards (the camera is pointing away from the user when the device is held in a natural way.)
unknown (the pointing direction of the camera is user configurable or cannot be known for some other reason.)
If no cameras are supported, the camera.orientations returns "null". Default camera (capture://video) is listed first in the String.
camera.resolutions The String returned specifies the sensor sizes of the cameras of the device. The String consists of sensor sizes per device, delimited by one whitespace (Unicode U+0020). The String for a sensor size has the format device_name : width x height without whitespace characters.
An example of a returned String: "devcam0:1024x768 devcam1:640x480".
If no cameras are supported, the camera.resolutions returns "null". Default camera (capture://video) is listed first in the String.


J2ME™ Web Services API (JSR-172)

String Description
xml.jaxp.subset.version Version of JAXP Subset APIs supported by the
device, for example, "1.0".
xml.rpc.subset.version Version of JAX-RPC Subset APIs supported by the
device, for example, "1.0".


S60 3rd Edition, FP2 system properties

String Description
com.nokia.mid.imei The IMEI (International Mobile Equipment Identity) of the device. See IMEI in Wikipedia.
com.nokia.mid.imsi The IMSI (International Mobile Subscriber Identity) stored in the SIM card. For more information on IMSI, see IMSI in Wikipedia. Note that 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.
com.nokia.mid.networkid Network identification parameters, such as network ID (NID in CDMA and MNC in GSM) and network short name. The returned string identifier contains both in the following format: <network ID> (<network short name>).
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).
com.nokia.mid.networkavailability Network availability. The property return value can contain "available" or "unavailable".
com.nokia.mid.batterylevel The battery charge level of device. The property value is the actual battery level in percentage.
com.nokia.mid.countrycode Current network country code.
com.nokia.mid.dateformat The preferred time format of device user 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 patterns.
com.nokia.mid.timeformat The preferred time format of device user 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 patterns.


Other

String Description
com.nokia.mid.dateformat The preferred date format indicated as a string pattern, which is formatted according to the rules defined in Java™ 2 Platform, Standard Edition, version 1.4.1, java.text.SimpleDateFormat class documentation for date patterns. Only a subset of SimpleDateFormat-defined pattern letters are used in this system property.
com.nokia.mid.timeformat
(in Series 40 devices only)
The preferred time format indicated as a string pattern, which is formatted according to the rules defined in Java™ 2 Platform, Standard Edition, version 1.4.1, java.text.SimpleDateFormat class documentation for time patterns. Only a subset of SimpleDateFormat-defined pattern letters are used in this system property.
com.nokia.network.access
(in Series 40 devices only)
Returns the networking access point type. the possible values for this property are:
  • pd — Packet data, for example GPRS
  • csd — Circuit-switched data, for example GSM CSD/HSCSD data call
  • bt_pan — Bluetooth PAN network
  • na — Not applicable, the implementation cannot determine the type
com.nokia.mid.imei
(in Series 40 3rd Edition devices only, not in Nokia 6270 and Nokia 6111)
Returns the device's IMEI code. Note: The MIDlet must be signed to manufacturer or operator domain; otherwise this value is "null".

See also

This page was last modified on 14 July 2014, at 12:48.
212 page views in the last 30 days.
×