Giving user feedback at application launch with a splash screen

ronanmac | 21 November, 2011 10:17

When a user launches an application it is generally a good idea to give them some feedback that the application has been activated. This is especially true for applications that take a long time to get started.  It can also be useful for applications to give the user information or instructions at start up; the Screenshot app is a good example. The solution is to use a splash screen.

A developer can create a splash screen in many different ways. For example, the following simple QML code can be used to create a QML splash screen: 

...
  initialPage: SplashScreen {
    id: splashPage
    Timer {
      id: timer
      interval: 3000 // 3 secs
      running: true
      onTriggered: {
        var component = Qt.createQmlObject( 'import QtQuick 1.1; MainPage {}', appWindow );
        appWindow.pageStack.push( component );
      }
    }
  }
...

This can be a solution if you can use loaders for reading or loading files in the background.

The Harmattan system also provides a simple, code free way to create splash screens using the invoker program used inside the _harmattan.desktop file.  For example, this will create splash screens for the Morse Player application:

[Desktop Entry]
...
Exec=/usr/bin/invoker --type=d --splash=/opt/morseplayer/morseplayer_portraitSplash.png --splash-landscape=/opt/morseplayer/morseplayer_landscapeSplash.png -s /opt/morseplayer/bin/morseplayer
...

(Naturally these images will need to be placed in the right location). These images are both in the 854x480 format, meaning that the portrait image needs to be rotated left by 90 degrees. Check out the developer library splash screen section for another example.

Check out the developer library also for more information about optimizing application startup.

Enjoy!


RSSComments

Also be aware of these splashscreen-related bugs

MilhouseVH | 21/11/2011, 20:28

https://harmattan-bugs.nokia.com/show_bug.cgi?id=77

https://harmattan-bugs.nokia.com/show_bug.cgi?id=141

I think this article should at least discuss the downsides of not using real application windows for splash screens.

You must login to post comments. Login
 
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved