Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - AppForge Programming » Understanding UltraLite Development with AppForge

Example: Using the persistent name to maintain state information Next Page

Notes on AppForge for Symbian OS


This section provides some notes about UltraLite development on the Symbian OS using AppForge.

Supported platforms and devices

UltraLite for AppForge supports all Symbian OS 7 and Symbian OS 8 devices supported by AppForge Crossfire. These include UIQ devices such as the Sony Ericsson P800 and P900 series, Nokia S60 devices such as the Nokia N-90, and Nokia S-80 devices such as the Nokia 9300 Communicator.

The devices supported depend on the version of AppForge Crossfire that you are using. For example, in order to support the Nokia 9300 Communicator you must have at least Crossfire 5.6.1.

Sample application

The Crossfire CustDB application includes projects for both the Nokia 9300 Communicator and for Sony Ericsson P800/P900 devices. You can find the application in samples-dir\UltraLiteForAppForge\CF_CustDB\.

To use the CustDB sample application
  1. From a command prompt, run the makedbs.bat file to create the UltraLite database.

  2. Open the solution file in Visual Studio .NET 2003.

  3. To synchronize, start the MobiLink server by choosing Programs > SQL Anywhere 10 > MobiLink > MobiLink Server Sample.

Symbian-specific notes for AppForge developers

Symbian OS uses a Windows-like nomenclature for its file system. You can use the dbf connection parameter to specify the location of an UltraLite database.

As with other AppForge projects, you must add a reference to iAnywhere.UltraLiteForAppForge in your project.

To configure a project for your target device:
  1. Select the project to configure.

  2. Choose AppForge > Crossfire Settings

  3. Choose Dependencies in the list, and add the UltraLite database file to the User Dependencies list.

  4. Select the appropriate device type from the list and use the settings dialog to specify an application UID and other application properties.

For cross-platform development, you can use the AppForge.Platforms.DeviceType enumeration to identify the platform on which the application is running. The Symbian OS members of the enumeration are as follows:

ConstanttTarget
SymbianOSCrystalNokia 9300/9500
SymbianOSPearlNokia S60
SymbianOSQuartzSony Ericsson P800/P900/P910 or Motorola A1000

Here is a simple example of platform-independent connection code in Visual Basic .Net:

        deviceType = sysInfo.DeviceType
        path = AppForge.MobileVB.Compatibility.Device.AppPath
        If deviceType = AppForge.Platforms.DeviceType.SymbianOSCrystal Or _
         deviceType = AppForge.Platforms.DeviceType.SymbianOSPearl Or _
         deviceType = AppForge.Platforms.DeviceType.SymbianOSQuartz Then
            connString = "dbf=" & path & "\ul_custdb.udb;"
        Else
            connString = "dbf=" & path & "\..\ul_custdb.udb;"
        End If
        connString += "con=custdbConn"
        Try
            Connection = DBManager.OpenConnection(connString)
        Catch ex As Exception
            MsgBox("Error when connecting to database: " & ex.Message)
            End
        End Try
Deploying AppForge projects to devices

To deploy an AppForge project to a Symbian OS device, you must first connect your device to your computer using a cable or a Bluetooth connection. The required connectivity software, drivers, and instructions should be provided with your device.

Applications are deployed to Symbian OS devices as an .sis file. If your device is properly connected to your development computer, you can deploy an AppForge project to a Symbian OS device by choosing AppForge > Deploy Application To Device and selecting the device type from the list.

An alternative deployment method is to create the SIS file on your development computer and then to deploy that in a separate operation. You can do this by choosing AppForge > Build Installation File.

Synchronizing applications

When synchronizing applications using TCP/IP or HTTP-based protocols, it is recommended that you specify the host address using an IP address, rather than a host name in the network protocol options that you set in the SyncStream.StreamParms property.