Getting your Qt app running and deployed on Symbian - Andreas Jakl

Page created by Alfredo Ramirez
 
CONTINUE READING
Getting your Qt app running and deployed on Symbian - Andreas Jakl
Getting your Qt app running and
     deployed on Symbian
            Andreas Jakl
Getting your Qt app running and deployed on Symbian - Andreas Jakl
Agenda

     • Developer Environment
         – Platforms, Simulator, On-Device Debugging
     • User Interface & Development
         – Icons
         – UIs
         – Native Symbian APIs
     • Versions & Tools
         – Smart Installer
         – Device & Phone tools
     • Distribute
         – Testing
         – Signing & Certificates
Getting your Qt app running and deployed on Symbian - Andreas Jakl
The Big Picture

     Developer resources & community                                           Nokia Store publishing
                                            Nokia Publish registration           9 million DL / day
                                                  One-time fee of €1              190+ countries
             Discussion boards,
                                          Submit an unlimited number of apps    125x operator billing
             e-learning videos,
                 examples

Complete Qt development environment
                 SDK, toolchain,
                 remote device testing,
                 etc.
                                                                Total:
Getting your Qt app running and deployed on Symbian - Andreas Jakl
Symbian & Qt

    • Qt works on S60 3.1+                                                                                                                    Nokia E71
                                                                                                                                           (S60 3.1, 2008)
                                                                                                                                                                            Nokia 700
                                                                                                                                                                      (Symbian Belle, 2011)
              – Nokia E71, E72, 5800, N8, X7, 700, etc. *
    • Look up platform versions
              – http://www.developer.nokia.com/Devices/

                                                                      Qt Compatibility                                                                    Qt Pre-Installed
 Series 60            Series 60              S60                 S60                  S60               S60 5.0  Symbian^2                      Symbian^3
    1.0                  2.0                 3.0                 3.1                  3.2                 =                                                       Symbian Anna
                      (+ 3 FPs)                                                                        Symbian^1
                                                                                                                                                                      Symbian Belle …

* Qt can be installed on all compatible devices. Not all devices are enabled for Qt content in the Ovi Store. Current list of Ovi Store device deployment support for Qt apps:
http://www.developer.nokia.com/Distribute/Packaging_and_signing.xhtml
Getting your Qt app running and deployed on Symbian - Andreas Jakl
The environment to create Qt apps for Symbian

DEVELOP
Getting your Qt app running and deployed on Symbian - Andreas Jakl
Developer Environment Setup

• Qt SDK
  – One-click installation
  – IDE, tool-chains,
    documentation, examples                       Maemo
  http://developer.nokia.com/Qt

                                  Desktop                        Simulator
                                                 Qt SDK
                                                  works on
                                                 Windows,
                                                 Linux, Mac

                                       Symbian                MeeGo
Getting your Qt app running and deployed on Symbian - Andreas Jakl
Symbian – Mac / Linux

• Symbian binaries cannot be compiled on Mac or Linux *
   – Legacy Symbian tool chain restriction

• Use Remote Compiler
   – Compilation on Nokia servers
     in the cloud
   – Real-time compiler log messages
   – Binaries sent back to you

• SDK installation / maintenance tool
   – “Experimental” section

      * Experimental Linux support for building Symbian apps: http://projects.forum.nokia.com/symbian_linux_qtsdk
Getting your Qt app running and deployed on Symbian - Andreas Jakl
Qt SDK: Simulator

• Efficient Testing
   – Quick
   – Simulate phone
     events & environment
   – Skins

• Only Qt APIs, no support
  for Symbian OS C++ native APIs

• Limited simulation of traditional softkey-menus
  (if not using Qt Quick Components)
Getting your Qt app running and deployed on Symbian - Andreas Jakl
On-Device Debugging

• Debug Connection                                      Qt Creator

   – Use CODA for all Symbian touch
   – App TRK for non-touch (S60 3.x)
• Qt SDK 1.1.3: only CODA support
                                             App               CODA
                                       TRK
   – Use older Qt SDK version for                               USB
                                       USB   TRK
     non-touch on-device debugging                             WLAN

                                         S60 3.x     Symbian^1 or newer
                                       (non-touch)        (touch)
Getting your Qt app running and deployed on Symbian - Andreas Jakl
Creating the Symbian look & feel

USER INTERFACE &
DEVELOPMENT
Surround Icons

• Since Anna, new “Surround” style (Squircles)
   – Recognizable, similar icon for all platforms
• Used in Series 40, Symbian & MeeGo
   – Minor differences in complexity and colors due to
     screen resolutions, etc.
Symbian Launcher Icons

• Design Guidelines & Toolkit
   – Templates
     http://bit.ly/SurroundIcons
   – SVG Converter
     http://bit.ly/SvgConverter
   – Online icon Generator
     http://depot.javispedro.com/
     nit/hicg/
In-App Icons

• Similar Guidelines for in-app icons
   – Toolbars and list icons
   – Template kit: re-usable default icons
     http://bit.ly/SurroundIcons
User Interfaces on Symbian

            C++                  QML / JavaScript
 QWidgets     Graphics View   Qt Quick   Qt Quick Components

                                  All these can be mixed in
                                  the same app if needed

HTML / JavaScript / CSS                  Other
                                                 Platform
        QtWebKit              QtOpenGL
                                                 OpenGL
QWidget UIs on Symbian

• Adapt to native platform UI
   – Some elements don’t integrate too well, e.g., dialogs
   – No automatic kinetic scrolling

• Compatibility
   – No style integration on MeeGo:
     diffcult porting
   – Focus of Qt 5: Qt Quick

→ QWidgets: not recommended
   – However, non-touch Symbian
     phones don’t support Qt Quick
Qt Quick Components

• Ready-made Qt Quick UI components
   – Statusbar, toolbar, buttons, text fields, etc.

• Symbian Belle look & feel
   – Also when app is deployed to S^3 or Anna

• Compatible to S^3+
Symbian Belle Design Guidelines

• Evolving Symbian design and user experience
   – Follow new style also when deploying on Symbian^3 & Anna
   – http://bit.ly/SymbianDesign
         Symbian^3 / Anna

                                                    Symbian Belle
Recommended
           Recommendations ...                        OK
                                          Not recommended

               Desktop App   Mobile App   Game

QWidgets

GraphicsView

Qt Quick

OpenGL

Web
Supported
                   Platforms and UIs                                                    Limited
                                                                         Not supported

                             Qt Quick    Qt Quick   QWidgets   Direct graphics            HTML (5)
                            Components                         (OpenGL, GraphicsView)

Symbian^3 / Anna

Symbian^1 / S60 5.0

S60 3.1 / 3.2 (non-touch)

MeeGo Harmattan

Maemo 5

Desktop
Accessing Native Symbian APIs

• Qt is huge ...
  ... but it can’t possibly
  cover all APIs of an entire
  Operating System
• Paradigms for mixing Qt with OS-specific code
   1. Same source files, #ifdef platform specific code
   2. Isolate platform specific parts to separate files to include
   3. Write a separate library
• More details
   – http://qt.nokia.com/files/pdf/whitepaper-using-qt-and-
     symbian-c-together/view
Native Symbian Note Dialog
                                                           Symbian^3          Symbian Belle
.pro file
 symbian { // Only relevant for Symbian target!
   LIBS += -lavkon \
           -leikcdlg \
           -leikctl
 }

.cpp file
 #if defined(Q_WS_S60)
  // Text you want to show in the note dialog
  QString noteText = "Success";
  // Convert the Qt String to a Symbian Descriptor
  TPtrC16 noteTextPtr(reinterpret_cast(noteText.utf16()));
  // New confirmation note (pre-defined in S60 framework)
  CAknConfirmationNote* noteConfirm = new CAknConfirmationNote;
  // Displays and deletes the dialog – you don’t have to delete it yourself!
  // As this method can potentially leave (the method has an L at the end of its name),
  // convert any resulting error into an exception
  QT_TRAP_THROWING(noteConfirm->ExecuteLD(noteTextPtr));
 #endif
Help during development

VERSIONS & TOOLS
Qt & the Symbian Legacy

• Qt support: S60 3.1+
   – Note: older phones = lesser computing power

• These phones don’t have Qt pre-installed
   – Installed on demand, over-the-air via
     the Smart Installer

• Qt: not officially verified on all devices
   – See Nokia Store support slide
Symbian: Smart Installer

 Qt      Install
                     Required Qt version
 App
                        not already
(& SI)                   installed?

                     Download and install
                     Qt & dependencies
Smart Installer Packaging

Activate Smart Installer
packaging in Qt Creator’s
Symbian Run settings
Qt Versions for Symbian

                                                    Qt Quick Components
     Qt 4.7.4
   Qt Quick 1.1                                                                             Qt SDK 1.1.3 *
 Qt Mobility 1.2
                                                                            Symbian Belle

     Qt 4.7.3
    Qt Quick 1.0                                                                            Qt SDK 1.1 *
Qt Mobility 1.1.3
                                                                Symbian Anna **

     Qt 4.6.3                                                                               Nokia Qt SDK 1.0
Qt Mobility 1.0.3
                                                    Symbian^3

         No Qt
                                        Symbian^1
                    S60 3.1   S60 3.2     S60 5.0

                                     * Qt SDK 1.1+ also includes a Qt 4.6.3 target for Symbian^1 and Symbian^3
                    ** The Nokia 500 does not have HW 3D acceleration, and therefore can’t be updated to Belle.
QtInfo

• What Qt versions are on your phone?

• Qt environment info app

• https://projects.developer.nokia.com/
  qtinfo
Phone Tools and Utilities

• Nokia File Browser
   – System standard browser hides some
     folders
   – http://bit.ly/FileBrowser

• Best Screen Snap
   – Tip: change to true color bmp format
     (lossless!) and memory card storage
   – http://www.smartphoneware.com/screen_sn
     ap-for-s60-5th-edition-product.php
PC Tools and Utilities

• .sis content viewers
   – SISContents
     symbiandev.cdtools.net
   – SISXplorer
     www.symbian-
     toys.com/sisxplorer.aspx

• SignSis-GUI
   – www.gosymbian.com/
     SSIS_download.html
Terminal Connectivity

• Remote access & remote shell for Symbian
   –   Windows, Mac and Linux
   –   Screen sharing, simulated pointer events
   –   File transfer and browsing
   –   Run applications from the command line
   –   Drag-and-drop .sis file install

   http://labs.qt.nokia.com/2011/04/15/introducing-muxcons/
Releasing your Qt app for Symbian

PUBLISH
Qt Support in the Nokia Store

S^3 / Anna / Belle                S60 5th Edition                            S60 3rd Edition (Qt 4.6)                      MeeGo / Maemo
E7-00                             X6-00                                      E72                                           N900 (>= PR1.3)
N8-00                             C6-00                                      E71                                           N9
C7-00 / Astound / Oro             C5-03                                      E66
C6-01                             N97 (mini)                                 E63
E6-00                             5800 XpressMusic                           E52
X7-00                             5530 XpressMusic
500                               5250
600                               5235
603                               5233
700                               5230
701                               5228

            * Status: 13. October 2011. Source: http://www.developer.nokia.com/Distribute/Packaging_and_signing.xhtml#article1_a
Free Remote Device Access

            Reserve time on a real device
            Full access to install and test your apps
            www.developer.nokia.com/rda
Symbian Platform Security *
              * Qt apps are native apps; therefore, the security model of the target operating system applies.

• Simple for developers, but be aware of:
1. Capabilities
   –   Define access to sensitive phone areas in .pro file
   –   Separated into different categories depending on security level
2. UIDs

                                                                                                                 All three are interlocked
   –   Random UID in testing range (0xE…) for development with
       basic capabilities
   –   Free worldwide unique UID (0x2...) from Nokia Publish for
       extended capabilities and/or when publishing
3. Certificates / Signing
   –   Automatic self-signed cert for development with basic capabilities
   –   Free development certificate with extended capabilities from
       Nokia Publish
   –   Free signing for apps published to Nokia Store
   –   Paid signing available when using other distribution channels or
       restricted capabilities

          Symbian Installation Error Guide: http://bit.ly/SymbianInstallation
Symbian UIDs

• Each process:
  unique identifier (UID3)
• .pro file:
   symbian {
     TARGET.UID3 = 0xE025BB49
   }

• Testing                                              This adds the
                                                  NetworkServices capability
   – Any UID starting with 0xE...
   – Automatically and randomly created by Qt Creator
• Publishing
   – Get a worldwide unique UID from Nokia Store publish support
   – 0x2... (protected range)
Symbian Security – Capabilities

1. Determine the required security / privacy features
   – Most common:                (See: developer.nokia.com/Community/Wiki/Capabilities)

   Feature                                       Capability
   Internet access, telephony, messaging         NetworkServices
   Access location (GPS, etc.)                   Location
   Camera, record audio                          UserEnvironment
                                                                                   Basic / User Capabilities
   Contacts, Calendar                            ReadUserData /
                                                 WriteUserData
   Bluetooth, NFC                                LocalServices
                                                                                   Extended / System
   IMEI, model name, battery status              ReadDeviceData
                                                                                   Capabilities

2. Add to Qt project file (.pro)
   symbian:TARGET.CAPABILITY += Location LocalServices
Symbian Security – Development

3. Get the right certificate during development

 No / Basic Capabilities                                                Extended Capabilities
 Use auto-generated self signed certificate             Sign up for Nokia Publish account (€1)
 (default, no action required)                                                    info.publish.nokia.com

                                                       Request development certificate (free)
                                              developer.nokia.com/Distribute/Packaging_and_signing.xhtml

                                                                                       Sign your app
                                                                               (Qt Creator build settings)

                                 Test on your develoment device(s)
Symbian Security – Publishing

   4. Publish
                                     No / Basic Capabilities
                                     Extended Capabilities
                              Sign up for Nokia Publish account (€1)
                                           info.publish.nokia.com

                             Request unique UID in 0x2... range and
                                development certificate (free)
                         developer.nokia.com/Distribute/Packaging_and_signing.xhtml

                          Package your Qt app with the Smart Installer
                                         (Qt Creator build settings)

                                   Publish to the Nokia Store
Need restricted capabilities?
developer.nokia.com/Community/Wiki/Capabilities
-> Purchase a Publisher ID ($200 / year)
Submit to Certified Signed process @ www.symbiansigned.com
All Capabilities & Signing Options

                                                                         Development          Free Nokia
                                                         Development
Capability Group     Capability Name   Self-Signed                       Certificate          Publish Signed /   Certified Signed
                                                         Certificate
                                                                         (verified account)   Express Signed
Basic / User         LocalServices     Yes, with user    Yes             Yes                  Yes                Yes
Capabilities         Location          confirmation at
                     NetworkServices   install time
                     ReadUserData
                     UserEnvironment
                     WriteUserData
System / Extended    PowerMgmt
Capabilities         ProtServ
                     ReadDeviceData
                     SurroundingsDD
                     SwEvent
                     TrustedUI
                     WriteDeviceData
Restricted           CommDD
Capabilities         DiskAdmin
                     NetworkControl
                     MultimediaDD
Manufacturer         AllFiles                                            Nokia Approval                          Nokia Approval
Capabilities         DRM                                                 Required                                Required
                     TCB

More Info: http://www.developer.nokia.com/Community/Wiki/Capabilities_%28Symbian_Signed%29
    Free through Nokia Publish
    Only available through www.symbiansigned.com
Vendor Name and Version

• Add vendor name to the .pro file
   – Required for publishing
• Add version number
   VERSION = 2.00.0
   symbian {
     vendorName = "Your Company"
     vendorinfo = \
      "; Localised Vendor name" \
      "%{$$addLanguageDependentPkgItem(vendorName)}" \
      ""\
      "; Unique Vendor name" \
      ":\"$$vendorName\"" \
      ""
     deployment_vendor.pkg_prerules += vendorinfo
     DEPLOYMENT += deployment_vendor
   }
Publishing – Checklist

• Smart Installer
• Vendor name and version
• Change development UID
  (0xE...) to final UID from
  Nokia Publish (0x2...)
   – Clean & rebuild project
   – Uninstall from phone
     before re-installing
• Test against guidelines
   –   http://support.publish.ovi.com/?p=64

• Publish unsigned,
  Smart Installer .sis file
Nokia Store

                                                   Access reports.
                                                   You get 70%, Nokia 30%.

                                 Quality Assurance*.

                 Create content items.
                 Add meta data.

 Register at
 info.publish.nokia.com
 (one-time fee of €1)

* Avoid the top 10 QA failures: http://support.publish.ovi.com/?p=1865
THANK YOU
More info → developer.nokia.com/Qt
You can also read