ExpediteConnection()

Description

The ExpediteConnection method starts the network connection setup process for the Flash Lite application. This method is provided by the Device object.

Setting up a network connection can take a mobile device anywhere from one to four seconds. If the setup process is started only when the connection is needed, the user may have to wait up to four seconds for the application to respond. To minimize the delay and provide fast response times with network content, use the ExpediteConnection method to start the setup process in advance. When the application later needs a network connection, it can use the active connection that has already been set up by the ExpediteConnection call.

You can call the ExpediteConnection method at any stage in your Flash Lite application.

Syntax

ExpediteConnection():Number

Arguments

The ExpediteConnection method does not take any arguments.

Return value

The ExpediteConnection method returns a number that indicates the status code for the call.

Table: ExpediteConnection status codes

Status code

Description

0

Success

-304

General error

-307

Method is not supported

-308

Method called with invalid input

Remarks

The ExpediteConnection method is only useful with standalone Flash Lite applications. Browser-embedded applications use the existing network connection provided by the Web Browser for S60.

Example code

The following code snippet creates a new Device object and uses it to start the network connection setup process with the ExpediteConnection method:

import com.nokia.lib.Device;

var deviceObject:Object = new Device();
// Start the network connection setup process
deviceObject.ExpediteConnection();

To download an example Flash Lite application that uses the ExpediteConnection method, see section Flash Lite applications.