Start-up screen

From Java Runtime 2.1 for Symbian onwards, MIDlets display a start-up screen by default when launched. The start-up screen provides users immediate feedback that the MIDlet is about to start.

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 and Shell.setVisible(true) in eSWT. 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.

The following figure shows the launching of a MIDlet that has a custom start-up screen. When the MIDlet is selected from the applications menu (left-hand image), the custom 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 custom start-up screen

You have three options for using the start-up screen in your MIDlet:

Default start-up screen

The default start-up screen shows the first screen of the MIDlet. If the MIDlet does not start in 3 seconds, then on the next launch, the default start-up screen is automatically dimmed.

The Java Runtime 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, you do not need to define anything in the MIDlet.

The following figure shows a default start-up screen 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 in normal view and with an exit button

The following figure shows the default start-up screen 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 dimmed and with an exit button

You can download the Eclipse project files for the above MIDlet by clicking here.

Custom start-up screen

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, the MIDlet uses the two most suitable: 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

The following figure shows the same custom start-up screen in portrait and landscape modes.

Figure: Custom start-up screen 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.

  • Push MIDlets do not show a start-up screen, not even the default start-up screen.

  • 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.

No start-up screen

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 devices that do not support start-up screens.