Start-up screen

From Java Runtime 1.0.0 for Series 40 onwards, MIDlets can display a custom start-up screen when launched. MIDlets can alternatively use the default start-up screen of the device. The start-up screen provides you immediate feedback that the MIDlet is about to start.

Note: Earlier Series 40 devices display a default start-up screen that MIDlets cannot change.

The start-up screen remains visible until the MIDlet is running and its UI is set visible. The UI is set visible when an LCDUI Displayable instance is set current as follows Display.setCurrent(Displayable). If the MIDlet does not start its UI, the user can close the MIDlet by pressing the call termination button which triggers the destroyApp method.

The following figures show the launching of a MIDlet in Nokia Asha software platform devices with a default start-up and 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

Figure: MIDlet start-up with a custom start-up screen

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

  • Default start-up screen

  • Custom start-up screen

Default start-up screen

Series 40 and Nokia Asha software platform devices use a pre-defined image as the default start-up screen. The same default start-up screen is used for all MIDlets on these devices. The default start-up screen is never dimmed. To use the default start-up screen on Series 40 and Nokia Asha software platform devices, you do not need to define anything in the MIDlet.

The following figure shows a default start-up screen on a Series 40 (left) and Nokia Asha (right) device.

Figure: Default start-up screen on a Series 40 device (left) and Nokia Asha (right) device

Custom start-up screen

You can only define one custom start-up screen ("splash screen") to replace the default one. If you define multiple custom start-up screen, the MIDlet uses the first valid image listed (see restrictions below). The image is aligned to the center of the screen, and it is not scaled in any way. Any surrounding empty space shows black.

To use a custom start-up screen, define its file name with the Nokia-MIDlet-Splash-Screen-Image JAD attribute:

Nokia-MIDlet-Splash-Screen-Image: example.png

Store the custom start-up screen files in the MIDlet project, so that it is included in the JAR file when you compile the MIDlet.

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