This section provides some notes about UltraLite development on the Symbian OS using AppForge.
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.
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\.
From a command prompt, run the makedbs.bat file to create the UltraLite database.
Open the solution file in Visual Studio .NET 2003.
To synchronize, start the MobiLink server by choosing Programs > SQL Anywhere 10 > MobiLink > MobiLink Server Sample.
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.
Select the project to configure.
Choose AppForge > Crossfire Settings
Choose Dependencies in the list, and add the UltraLite database file to the User Dependencies list.
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:
Constantt | Target |
---|---|
SymbianOSCrystal | Nokia 9300/9500 |
SymbianOSPearl | Nokia S60 |
SymbianOSQuartz | Sony 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
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.
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.