From Java Runtime 1.0.0 for Series 40 and Java Runtime 2.1 for Symbian onwards, MIDlets can display a custom start-up screen when launched. MIDlets can alternatively use the default start-up screen supplied by the device. The start-up screen provides users immediate feedback that the MIDlet is about to start.
Note: Earlier Series 40 devices display a default start-up screen that MIDlets cannot change. Earlier Symbian devices display no start-up screen.
Note: This feature is not supported in Nokia SDK 1.0 for Java.
The start-up screen remains visible until the MIDlet is running
and its UI is set visible. The UI is set visible by Display.setCurrent(Displayable)
in LCDUI (in Series 40 and Symbian) and Shell.setVisible(true)
in eSWT (only in Symbian). On Symbian devices, if the MIDlet does not start
its UI in 10 seconds, an exit button is automatically shown in the
start-up screen. The exit button is localized. If the user selects
the exit button, the MIDlet's destroyApp
method is
called and the MIDlet is closed. No exit button is shown on Series
40 devices, but the user can close the MIDlet by pressing the call
termination button.
The following figures show the launching of a Series 40 MIDlet with a default start-up screen and a Symbian MIDlet with a custom start-up screen. When the MIDlet is selected from the applications menu (left-hand image), the start-up screen is immediately displayed (middle image), followed by the MIDlet UI after the MIDlet is started (right-hand image).
Figure: MIDlet start-up with a default start-up screen (Series 40)
Figure: MIDlet start-up with a custom start-up screen (Symbian)
You have three options for using the start-up screen in your MIDlet:
No start-up screen (only on Symbian devices)
Series 40 devices use a pre-defined image as the default start-up screen. The same default start-up screen is used for all MIDlets on a Series 40 device. Symbian devices use the first screen of the MIDlet as the default start-up screen. On Symbian devices, if the MIDlet does not start in 3 seconds, then on the next launch, the default start-up screen is automatically dimmed. The default start-up screen is never dimmed on Series 40 devices.
The Java Runtime for Symbian environment creates the default start-up screen when the MIDlet is launched for the first time (specifically, when the MIDlet draws on the screen for the first time). This means that the default start-up screen is not shown during first start-up. The default start-up screen is updated after each start-up.
To use the default start-up screen on Series 40 and Symbian devices, you do not need to define anything in the MIDlet.
The following figure shows a default start-up screen on a Series 40 device.
Figure: Default start-up screen on a Series 40 device
The following figure shows a default start-up screen on a Symbian device at the beginning of start-up and 10 seconds into start-up (with an exit button). In this case, the previous start-up took 3 seconds or less.
Figure: Default start-up screen on a Symbian device in normal view and with an exit button
The following figure shows a default start-up screen on a Symbian device at the beginning of start-up (dimmed) and 10 seconds into start-up (dimmed with an exit button). In this case, the previous start-up took more than 3 seconds.
Figure: Default start-up screen on a Symbian device dimmed and with an exit button
You can download the Eclipse project files for the above Symbian MIDlet by clicking here.
You can define one or more custom start-up screens ("splash screens") to replace the default one. If you define multiple custom start-up screens:
On Series 40 devices, the MIDlet uses the first valid image listed (see the restrictions below). The image is aligned to the upper left corner of the screen, and it is not scaled in any way. Any surrounding empty space shows black.
On Symbian devices, the MIDlet uses the two most suitable images: one for portrait mode and another for landscape mode.
The most suitable images are the ones that cover the screen area the best, after possible scaling. If an image is larger than the screen, it is scaled down to fit the screen. Its aspect ratio is not changed. If the image is smaller than the screen, it is not scaled. In other words, the MIDlet uses the images whose aspect ratios and final sizes (after scaling down) most closely match the screen aspect ratio and size. If you define two images with identical sizes, the first one in the list is used.
If an image does not fully fill the width or height of the screen, the image is centered. Any surrounding empty space shows the underlying native UI dimmed.
To use a single custom start-up screen, define its file name
with the Nokia-MIDlet-Splash-Screen-Image
JAD attribute:
Nokia-MIDlet-Splash-Screen-Image: example.png
In this case, the same start-up screen is used for both portrait and landscape modes.
To use multiple custom start-up screens,
define their file names (separated by commas) with the Nokia-MIDlet-Splash-Screen-Image
JAD attribute:
Nokia-MIDlet-Splash-Screen-Image: example_portrait.png, example_landscape.png
Store the custom start-up screen files in the MIDlet project, so that they are included in the JAR file when you compile the MIDlet.
The following figure shows the same custom start-up screen on a Symbian device in portrait and landscape modes.
Figure: Custom start-up screen on a Symbian device in portrait and landscape modes
When creating a custom start-up screen, keep the following restrictions in mind:
The supported image formats are:
GIF (Graphics Interchange Format)
JPG / JPEG (Joint Photographic Experts Group)
PNG (Portable Network Graphics)
Only still images are supported. For example, you cannot use an animated GIF as a start-up screen.
Damaged images and images that are not supported by the platform are ignored. In these cases, the default start-up screen is shown.
If the handling of the Nokia-MIDlet-Splash-Screen-Image
JAD attribute fails, the default start-up screen is shown.
On Symbian devices, push MIDlets do not show a start-up screen, not even the default start-up screen. On Series 40 devices, push MIDlets show a start-up screen normally.
The start-up screen must not look or feel usable, since it can confuse users if they try to interact with it and receive no response.
On Symbian devices, you can disable the
start-up screen for the MIDlet by setting the Nokia-MIDlet-Splash-Screen-Image
JAD attribute to suppress
:
Nokia-MIDlet-Splash-Screen-Image: suppress
In this case, no default or custom start-up screen is shown. MIDlets whose start-up screen is disabled behave the same way as they would on Symbian devices that do not support start-up screens.
Note: You cannot disable the start-up screen on Series 40 devices. If
you set the Nokia-MIDlet-Splash-Screen-Image
JAD
attribute to suppress
and run the MIDlet on a Series
40 devices, the system treats the value as the file name of a custom
start-up screen. If no such file exists, and you need to make sure
that this is the case, the system does nothing.
Note: Do not use this option by default. This option is provided mainly as a fallback during MIDlet development and testing. Disabling the start-up screen does not conform to the default user experience in launching applications and can therefore confuse users. It is recommended that you use either a custom start-up screen or the default one.