com.nokia.mid.ui.DirectGraphics
Nokia UI API has the ability to draw and fill triangles and polygons.
In MIDP 1.0 there is no way to reuse the same image for sprites moving in different directions. Nokia UI API is able to draw the image in different orientations.
All devices supporting the Nokia UI API support transparency
in the standard MIDP Image.createImage(String)
and Image.createImage(byte[],
int, int)
methods. PNG’s “simple transparency” (that is, tRNS chunk)
is supported, as is the alpha channel, although alpha blending (blending drawn
pixels’ colors with background pixels’ colors) may be unsupported.
In practice, this means that if you create your images from PNG-format files or PNG-format byte data with transparency, when you draw them, the transparent pixels will not be drawn. This allows you to have non-rectangular sprites.
DirectGraphics
class includes several getPixels
and drawPixels
methods
for doing this, but MIDlets that take full advantage of this feature will
sacrifice portability even between Nokia device models.
com.nokia.mid.sound.Sound
The Nokia UI API adds the ability to play sound. There are two mandatory types of sound supported initially:
Single notes, specified by frequency and duration.
Simple tunes, specified using the Nokia Smart Messaging ring tone binary format (the same format used for downloading new ring tones to Nokia devices).
In addition, SoundListener
interface can be implemented
to keep a queue of sounds to play next in order to have new sounds played
after existing sounds have finished playing.
When a Nokia device is set to Silent, the Nokia UI API sound methods will not produce any sound.
There is no way for the user to otherwise control the volume of sound produced by MIDlets. Therefore, MIDlets that produce sound may benefit from an option (for example, in an Options screen) to set the volume level of sound produced.
com.nokia.mid.ui.DeviceControl
The Nokia UI API adds to MIDP the ability to control the device’s vibration feature and screen backlight.
Note: MIDlets that use vibration and lights may benefit from an option (for example, in an Options screen) that allows that use to be enabled or disabled. Some users may prefer to disable these features.