Doc: edit text about deploying to Android

The default options for Qt 4 and Qt 5 are different.

Add background information about Android packages and
move information about specifying package settings from
the run settings topic to here.

Change-Id: I8ee0fac124e19233e85d17e1e37f060183149675
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Leena Miettinen
2013-05-06 15:19:04 +02:00
parent 3d1102081b
commit e2b00f5cec
5 changed files with 127 additions and 29 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -112,7 +112,7 @@
\li Select \gui Details to view the \li Select \gui Details to view the
\gui {Package configurations}. For more information about the \gui {Package configurations}. For more information about the
options you have, see options you have, see
\l{Specifying Run Settings for Android Devices}. \l{Specifying Settings for Application Packages}.
\li To specify settings for deploying applications to Android, select \li To specify settings for deploying applications to Android, select
\gui Details to view the \gui {Deploy configurations}. For more \gui Details to view the \gui {Deploy configurations}. For more
@@ -154,7 +154,7 @@
\li Select \gui Details to view the \li Select \gui Details to view the
\gui {Package configurations}. For more information about the \gui {Package configurations}. For more information about the
options you have, see options you have, see
\l{Specifying Run Settings for Android Devices}. \l{Specifying Settings for Application Packages}.
\li To specify settings for deploying applications to Android, select \li To specify settings for deploying applications to Android, select
\gui Details to view the \gui {Deploy configurations}. For more \gui Details to view the \gui {Deploy configurations}. For more

View File

@@ -1,10 +1,8 @@
\section2 Specifying Run Settings for Android Devices To specify information for the Android manifest file, select \gui Projects >
\gui Run > \gui {Package configurations}. The Android system uses the
information from the file to start application components.
In \gui {Package configurations}, you can specify information for the \section2 Specifying Package Data
Android manifest file. The Android system uses the information from the file
to start application components.
\section3 Specifying Package Data
In the \gui Manifest tab, you can select the API level to use for the In the \gui Manifest tab, you can select the API level to use for the
Android target SDK and the name and version number for the application Android target SDK and the name and version number for the application
@@ -30,14 +28,14 @@
\l{http://developer.android.com/guide/components/fundamentals.html} \l{http://developer.android.com/guide/components/fundamentals.html}
{Android Application Fundamentals}. {Android Application Fundamentals}.
\section3 Specifying Application Data \section2 Specifying Application Data
In the \gui Application tab, you can select an icon for the application and In the \gui Application tab, you can select an icon for the application and
give the application a name. give the application a name.
\image qtcreator-android-application.png "Application tab" \image qtcreator-android-application.png "Application tab"
\section3 Setting Permissions \section2 Setting Permissions
In the \gui Permissions tab, you can specify the permissions that your In the \gui Permissions tab, you can specify the permissions that your
application needs. Users are asked to grant the permissions when they application needs. Users are asked to grant the permissions when they
@@ -49,7 +47,7 @@
Select from existing Android permissions or add new ones to deploy the Select from existing Android permissions or add new ones to deploy the
application to a particular Android OS. application to a particular Android OS.
\section3 Selecting Qt Libraries \section2 Selecting Qt Libraries
In the \gui Libraries tab, specify which Qt libraries the application uses. In the \gui Libraries tab, specify which Qt libraries the application uses.
To automatically determine this, select \gui {Read Infomation from To automatically determine this, select \gui {Read Infomation from
@@ -66,7 +64,7 @@
In addition, the Java Loader uses this list to determine which Qt Libraries In addition, the Java Loader uses this list to determine which Qt Libraries
and other prebundled libraries to load with your application. and other prebundled libraries to load with your application.
\section3 Signing Android Packages \section2 Signing Android Packages
In the \gui {Sign Package} tab, you can sign the Android package by using In the \gui {Sign Package} tab, you can sign the Android package by using
a private key from the keystore. To create new keys, select \gui Create. a private key from the keystore. To create new keys, select \gui Create.

View File

@@ -25,31 +25,132 @@
\title Deploying Applications to Android Devices \title Deploying Applications to Android Devices
When you select a \gui {Qt for Android Kit} for a project, \QC creates and
maintains a set of files that are required to make your application run on
Android devices.
\QC adds the following files to your project:
\list
\li Java files, which serve as the entry point into your application and
that automatically load Qt and execute the native code in your
application.
\li AndroidManifest.xml, which provides meta-information about your
application.
\li Other XML files, which specify the dependencies of your application.
\li Resource files.
\li Libraries and QML files, which can be included in the project
depending on the deployment method that you select.
\endlist
\QC adds the files to the project to a subdirectory called \c android. The
contents of the \c android folder are used to create a distributable
application package.
\QC supports the following methods of deployment for Android applications:
\list
\li As a stand-alone, distributable application package (APK).
\li As a minimal APK that contains a dependency to the Ministro tool.
The Ministro tool downloads the necessary Qt libraries from a
repository of your choice.
\li As an incomplete APK that is suitable for testing and debugging
applications on a device connected to the development host. The APK
relies on the device containing the Qt libraries in the correct
location. \QC copies the libraries to that location the first time
you deploy the application.
\endlist
The default option depends on whether you are developing with Qt 4 or Qt 5.
The Necessitas SDK does not support bundling Qt libraries with applications,
so you must use Ministro when developing with Qt 4.
\section1 Specifying Settings for Application Packages
On Android, applications are distributed in packages called APK. \QC creates
the APK for you. If you want to do this manually, you must first make sure
that the appropriate packaging and build files are in place. \QC places the
files in the \c android subfolder of the project.
\include android/creator-projects-settings-run-android.qdocinc
\section1 Deploying Application Packages
To specify settings for deploying applications to Android devices, select To specify settings for deploying applications to Android devices, select
\gui Projects > \gui Run. \gui Projects > \gui Run > \gui {Deploy configurations} > \gui Details.
\image qtcreator-deploy-android.png "Deploy configurations" \image qtcreator-deploy-android.png "Deploy configurations"
Select the \gui {Use Qt libraries from device} option to use Qt libraries installed To copy Qt libraries and files to the project directory and to bundle them
on the device. If you also select the \gui {Use local Qt libraries} check box, \QC passes as part of the APK, select the \gui {Use Qt libraries from device} option
special parameters to the application, forcing it to use Qt libraries from the and the \gui {Use local Qt libraries} check box. This is the default option
\c{/data/local/tmp/qt} folder on the device. If you do not select it, the application needs when developing with Qt 5.
the Ministro package to run.
Select the \gui {Deploy local Qt libraries} option to deploy Qt libraries from \section1 Using Ministro to Install Qt Libraries
the specified Qt for Android SDK (for example, android-lighthouse-4.8.0).
This option enables you to develop on the Qt framework to test it. This To minimize the size of your APK, you can package the application with an
option automatically selects the \gui {Use local Qt libraries} check box, but you external dependency called Ministro. If a user downloads your application,
can use it also independently. and it is the first application on their device to depend on Ministro, they
are asked to install Ministro before they can run your application.
Ministro serves as a central repository for Qt libraries. This enables
several applications to share the libraries, which only need to be installed
once. To use this deployment method, you must set up a repository for the
libraries that you want to distribute. To specify the
repository URL, edit the file \c {android/res/values/libs.xml}, which is
created by \QC.
To use Ministro to install the Qt libraries, select the
\gui {Use Qt libraries from device} option (without any other options).
This is the default option when developing with Qt 4.
\section1 Deploying Qt Libraries for Debugging
To test your application on a device that is physically connected to the
development host (or on an emulator), you can copy the Qt libraries into a
temporary directory on your device and run the application against them.
An APK built in this way is not distributable, since it relies on the device
containing the Qt libraries in the correct location. However, as the Qt
libraries are only copied into the device once, this method provides a fast
turn-around time, and is therefore convenient for testing the application
during development.
Select \gui Projects > \gui Run > \gui {Deploy configurations} >
\gui Details, and then select the \gui {Deploy local Qt libraries} option
and the \gui {Use local Qt libraries} check box to deploy Qt libraries to
the \c{/data/local/tmp/qt} folder on the device and to run the application
against them.
\section1 Installing Ministro \section1 Installing Ministro
To install Ministro, select the \gui {Install Ministro, system-wide Qt shared The easiest way to install Ministro is to do it on the device via Google
libraries installer} option. You Play. When you run the application for the first time, a dialog pops up and
can use this option also to install any Android package (.apk). You can use this guides you through the installation.
option to install applications on an Android Virtual Device (AVD). Download
the Ministro .apk from the Google Market or from the To use \QC to install Ministro, you must first download the Ministro .apk
from the Google Market or from the
\l{http://necessitas.kde.org/necessitas/ministro.php}{Ministro} home page. \l{http://necessitas.kde.org/necessitas/ministro.php}{Ministro} home page.
Then select the \gui {Install Ministro, system-wide Qt shared
libraries installer} option in \gui Projects > \gui Run >
\gui {Deploy configurations} > \gui Details.
You can use this option also to install any Android package (.apk).
You can use this option to install applications on an Android Virtual
Device (AVD).
*/ */

View File

@@ -51,7 +51,6 @@
\include projects/creator-projects-settings-run-debug.qdocinc \include projects/creator-projects-settings-run-debug.qdocinc
\include linux-mobile/creator-projects-settings-run-linux.qdocinc \include linux-mobile/creator-projects-settings-run-linux.qdocinc
\include qnx/creator-projects-settings-run-qnx.qdocinc \include qnx/creator-projects-settings-run-qnx.qdocinc
\include android/creator-projects-settings-run-android.qdocinc
\endif \endif
\section1 Specifying a Custom Executable to Run \section1 Specifying a Custom Executable to Run