How to develop applications with Qt Mobility based on Symbian device

本文介绍了如何利用Qt Mobility项目开发跨平台移动应用,特别是针对Symbian设备。Qt Mobility提供了一系列API,包括联系人、位置、消息等。同时,详细阐述了Nokia Qt SDK的安装、开发环境设置、应用构建和运行,以及签名安装到Symbian设备的步骤。

1.  Overview for Qt Mobility                            

The Qt Mobility Project is a project within Nokia that is creating a new suite of Qt APIs for mobile device functionality. These APIs will enable cross-platform mobile application development. So you can develop the native applications by yourself, such as Messaging, Contacts, PhoneBook, FileManager and so on.

 

Qt Mobility contains the following APIs:

Bearer Management: An API to control the system’s connectivity state.

Contacts: An API enabling clients to request contact data from local or remote backends.

Location: The location API provides a library for distributing and receiving location data using arbitrary data sources.

Messaging: The Messaging API enables access to messaging services.

Multimedia: Provides a set of APIs to play and record media, and manage a collection of media content.

Publish & Subscribe: The publish and Subscribe API, containing Value Space, enables applications to read item values, navigate through and subscribe to change notifications.

Qt Service Framework: A set of Qt APIs to allows clients to discover and instantiate arbitrary services.

Sensors API: The Sensors API provides access to sensors.

System Information: A set of APIs to discover system related information and capabilities.

Versit API: An API to manage Versit documents.

 

1.  Overview for Nokia Qt SDK                          

Nokia Qt SDK leverages the power of the Qt framework and tools, combining them with tools designed specifically to streamline the creation of applications for Symbian, Maemo, and the forthcoming MeeGo platform. This allows you to build applications for hundreds of millions of Nokia device owners.

Nokia Qt SDK offers the following benefits to application developers:

èEasy installation

One installation package is all you need to get started. No complicated setup, just connect your devices and your environment is complete.

èComplete tool chain

Contains all the tools you need to go from application concept to fully tested, ready-to-deploy application on multiple target platforms: Symbian, Maemo, and MeeGo.

èRapid development

Intuitive, yet powerful tools, such as Qt Creator and Qt Designer, and on-device debugging power you through the development cycle. Think it, do it, it’s that easy.

èQt Mobility APIs

If your application needs to know a location or send a message, for example, you can use the new Qt APIs for mobile development.

èQt Simulator

Find out how your application will work on any Qt enabled device quickly and easily. No need for complex device emulators, just let the Nokia Qt SDK do the work.

èOne code line, multiple devices

With Nokia Qt SDK and the power of Qt you can create applications for Symbian, Maemo, and MeeGo devices with less coding effort. You can build and run the applications from Qt Creator for multiple target platforms.

Nokia Qt SDK contains the following tools and modules:

  • Qt Creator 2.0 integrated development environment (IDE)
  • Online updater that automatically installs new versions of Nokia Qt SDK and patches to it, as they become available
  • Qt Simulator for testing Mobility API functions
  • Qt Mobility API 10.1
  • MADDE tool chain that supports the Nokia N900
  • Symbian tool chain
  • On-device debugging from Qt Creator
  • Remote compilation service that provides a simple, standardized environment for building Qt applications and creating installation packages for Symbian and Maemo devices

Note: Remote compiler is an experimental component that you must install separately from the package that is included in Nokia Qt SDK

  • Windows host development environment (Windows7, Vista, XP)
  • Linux development environment for the Nokia N900
  • Beta release of the Mac development environment for Maemo
  • Nokia Smart Installer that makes it easier for users to install Qt applications to Symbian phones by checking whether the device contains the necessary software and by installing the missing pieces. This helps keep the size of the installation package down

 

2.  Install Nokia Qt SDK on PC                           

i: Download Nokia Qt SDK from here:

http://developer.qt.nokia.com/

 

ii: Install the downloaded Nokia Qt SDK to the default path.

   iii: After finished, you can see that from the start menu:

 

iv: There is a bug for the current Nokia Qt SDK release, so you need to fix this issue manually.

 

How to fix, please refer to the description of this bug: http://bugreports.qt.nokia.com/browse/QTSDK-98

 

Now, Nokia Qt SDK with Qt Mobility package has been installed successfully on PC.

 

Note:

We recommend to use Nokia Qt SDK for developing applications, because it’s easy to install Qt Mobility module with Qt. This module has been bind with Nokia Qt SDK, and will be upgraded with Nokia Qt SDK together.

 

 

3.  Setting Up Development Environment for Symbian     

Hardware and Software Requirements

Windows is the only development platform for the Symbian target supported at the moment.

For deploying and running applications on the device, you need the following:

  • The Nokia USB drivers that come with PC Suite or Ovi Suite
  • Make sure that the latest Qt 4.7.1 library has bind with your phone.
  • The App TRK application for your device
  • The qt.sis and qtwebkit.sis packages installed on the device, that is delivered with the Qt SDK
  • Qt Mobility APIs installed on the device, if you use them in applications

 

Installing Required Applications on Devices

The App TRK application and Qt Mobility module is built-in for our test build (for example: vasco week46_ps2), so you just need to install qt.sis, qtwebkit.sis.

4.  Building and Running Applications                          

You can test your application on a device by building and running it from Qt Creator for the Symbian Device target.

i: Connect the device to the development PC through a USB cable and then launch Qt Creator and switch to Projects view for adding symbian device target.

 

ii: Select the “Symbian Device” as the new target, now here is the result:

 

iii: Now, copy you project folder to C:/NokiaQtSDK/Symbian/SDK first, and then you can open it(sendSMS demo), and select symbian device target to compile.

 

iv: The tool tip of the target selector shows more details about the actual device that will be used when you run your application.

 

v: After compiling, an unsigned sis file is created in your project folder. Now you need to sign this sis file for installing it to symbian device.

There are two ways to sign sis file.

First: you can set the configure on QtCreator to sign the sis file , install and launch it automatically on Symbian device.

 

 

Second: this way is provided by symbian SDK. You need to do:

i: Add C:/NokiaQtSDK/Symbian/SDK/epoc32/tools to system environment “path”.

ii: Try to test, you will see:

 

iii: type the following commands to sign sis file(you can make a bat file to do this):

signsis –s unsign.sis signed.sis C:/ClientPlatformSDK/2.0/tools/internal/certs/rd.cer C:/ClientPlatformSDK/2.0/tools/internal/certs/rd-key.pem

iv: Now, you can install the signed.sis on symbian device.

 

 

 

 

 

 

 

 

 

 

 

 

 

5.  Reference documents                                    

Nokia Qt SDK

http://qt.nokia.com

 

Nokia forum

http://wiki.forum.nokia.com

 

Workaround for Nokia Qt SDK

http://bugreports.qt.nokia.com/browse/QTSDK-98

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值