/****************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (C) 2011 - 2014 Research In Motion
**
** Contact: Research In Motion (blackberry-qt@qnx.com)
** Contact: KDAB (info@kdab.com)
**
**
** GNU Free Documentation License
**
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of this
** file.
**
**
****************************************************************************/

/*!
    \contentspage {Qt Creator Manual}
    \previouspage creator-developing-baremetal.html
    \page creator-developing-bb10.html
    \nextpage creator-developing-generic-linux.html

    \title Connecting BlackBerry 10 Devices

    \QC provides a plugin that enables you to develop for QNX and BlackBerry 10 platforms.
    This page explains the basic steps to develop for BlackBerry 10 using \QC.

    The native BlackBerry 10 NDK includes Qt 4 (4.8.4 or newer) for both simulator (x86) and device (arm) targets available for development. Compared with the development for the PlayBook, Qt libraries are integrated in the BlackBerry 10 device firmware and can be used by Qt applications as shared libraries.

    Before starting to develop for BlackBerry 10 you need to download the following tools:

    \list
        \li \l {http://developer.blackberry.com/native/download/} {QNX Momentics IDE} - it is recommend to download the latest version to enable all \QC features
        \li \l {http://developer.blackberry.com/native/download/} {BlackBerry 10 Simulator} if you do not have a BlackBerry 10 device
        \li BlackBerry code signing keys (https://www.blackberry.com/SignedKeys/)
    \endlist


    \section1 Setting Up BlackBerry 10 Environment in Qt Creator

    To check your BlackBerry 10 configuration, including the API level, the
    Signing Keys and the Device registration, select \uicontrol Tools >
    \uicontrol Options > \uicontrol BlackBerry > \uicontrol Setup.

    \image qtcreator-blackberry-setupage.png "BlackBerry setup page"

    \list 1

        \li Set up API Levels:

        \list 1
            \li Select \uicontrol Tools > \uicontrol Options > \uicontrol BlackBerry >
                \uicontrol {API Levels and Runtimes} to list all registered API Levels automatically
                detected by \QC.
                    \image qtcreator-blackberry-apilevels.png "BlackBerry API leves and Runtimes page"
            \li The API Levels printed with a bold font are active. Use
                \uicontrol Activate and \uicontrol Deactivate to change it. When
                an API Level is active, \QC registers kits, Qt versions, tool
                chains, and debuggers to enable BlackBerry 10 development
                against the API Level.
            \li Use \uicontrol Add to install a new API Level or to register an
                existing one.
            \li It is recommended to keep the newest version as the default API level. \QC will use the available BlackBerry tools from the default API level to implement several of the plugin functions including device management, deployment process and the BlackBerry Signing Keys support. Some of those functions require 10.2 version or newer.
        \endlist

        \li Set up your Signing Keys:

        \list 1
            \li Select \uicontrol Tools > \uicontrol Options >
                \uicontrol BlackBerry > \uicontrol Keys.
            \li Register a BlackBerry Signing Authority - if you do not have any, the page will guide you to an online web form to request one.
            \li Select \uicontrol {Create Certificate} to create a Developer
                Certificate.
            \li To package your application in development mode, select
                \uicontrol Request to request a debug token or
                \uicontrol Import to import a valid token.
                \image qtcreator-blackberry-keys.png "BlackBerry Keys page"
            You can also access the debug token list in \uicontrol Tools >
            \uicontrol Options > \uicontrol Devices when you register a
            BlackBerry device. To use the same debug token for different
            devices, select \uicontrol{Edit} to add, remove or update the debug
            token's device PINs.
        \endlist


        \li Register your device:

        \list 1
            \li On the device, select \uicontrol Settings >
                \uicontrol {Security and Privacy} > \uicontrol {Development Mode}
                to switch the BlackBerry 10 device to development mode.
            \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Devices
                > \uicontrol Add > \uicontrol {Blackberry Device} to add a
                BlackBerry Device. \QC should auto detect your BlackBerry device
                if the default API level is set to 10.2 or newer.
            \li In the \uicontrol {Device password} field, enter the device
                password. \QC will query information from the device.
                \image qtcreator-blackberry-add-device.png "BlackBerry Device Wizard"
            \li Select \uicontrol Import to import a valid debug token for the
                device or \uicontrol Request to request a new token.
                \image qtcreator-blackberry-device-debugToken.png "BlackBerry Device debug token"
            \li If your device is successfully added, it should be listed in
                \uicontrol Tools > \uicontrol Options > \uicontrol {Devices}.
                \image qtcreator-blackberry-device.png "BlackBerry Device Configuration page"
            \li Select \uicontrol Upload to upload your debug token to the
                device.
            \li Select \uicontrol {Connect to device} to connect to the device.
                You should close any other pending connections from a shell or
                other IDE to successfully connect your device in \QC.
            \li Select \uicontrol Tools > \uicontrol Options >
                \uicontrol {Build & Run} > \uicontrol Kits to add your device to
                compatible BlackBerry 10 kits.
        \endlist

    \endlist

    \include qnx/creator-key-management-qnx.qdocinc

    For more details please refer to the Qt-Project wiki page: \l {http://qt-project.org/wiki/BlackBerry} {http://qt-project.org/wiki/BlackBerry}.
*/
