UIQ Technology
Symbian OS Library

UIQ 3.1 SDK        UIQ developer portal

[Index] [Spacer] [Previous] [Next]



1 General application behavior

This section describes the general behavior in different states (start-up, foreground, background, closing) during an application’s lifetime.


1.1 Application handling


1.1.1 Application instances

There should always be only one instance of an application running at any time. When an application is launched, the UIQ application framework will make sure that a new application instance is not created if one is already running. This behavior can, but should not, be overridden by the application.

It should not be possible to start more than one instance of the same application.


1.1.2 Application lifetime

Once an application is started it should not be closed again. Instead, it is placed in the background when not used. The user, another application or a notification could force an application into the background. The user should be able to resume work in the application as soon as it is brought to the foreground again.

Applications can be forced to close down by the framework, but the user should not have the choice to do so.

The application should not present an “Exit application option” to the user.


1.1.3 Application closing

If a low memory situation occurs, the Memory Manager framework will ask the application to close down. The default behavior is that the framework calls the CEikDocument::SaveL() method where the application should save any unsaved data. Then EEikCmdExit is sent to the application and should be handled in CEikAppUi::HandleCommandL() in the usual way.

See even the section on Memory Manager Interaction about exceptions to this default behavior.

If an application is forced to close down, any unsaved changes should be saved first.

[Top]


1.2 Application tasks


1.2.1 Application or device busy

An application should always make use of the multitasking environment which is available. For example, use ActiveObjects to implement long running tasks. Otherwise, use separate threads, if that is more appropriate.

The application should not depend on other device or system tasks to complete before continuing general application processing. For example, it should be possible to save an SMS while receiving a new one or to scroll in lists while the device is adding or deleting entries.

It should always be possible to select commands, use the application and switch away from the application even if the application or device is busy with some other task.

[Top]


1.3 View behavior


1.3.1 Switching views

The framework controls the behavior of view switching; an application can, but should not, override it.

A view switch can be:

When returning to an application after switching to another, the view tab and the highlight position are shown in the same way as they were before switching away.

When switching away from a view, only changed or new non-empty entries should be saved. If an entry is only opened and viewed, the entry should not be saved again when closed. Saving unchanged entries could, for example, affect synchronization and unnecessarily drain battery power.

All changes in an application view should be saved, without user confirmation, as soon as a view switch occurs.


1.3.2 Canceling a view

When a view is cancelled, the default behavior of the framework is to make sure that any changed data is not saved. This behavior can, but should not, be overridden by the application.

Changed data should not be saved when the user cancels a view.


1.3.3 Removed entry information

When editing an entry results in removing all of the information it contains, the entry itself should also be removed when saved. This avoids any stray unusable entries.

If all information is removed from an entry the entire entry should be removed when closed.