Publishing to Google Play | Qt 5.15

- Qt 5.15
- Publishing to Google Play
- Qt 5.15.16 Reference Documentation

# Publishing to Google Play

Qt for Android provides a complete solution to develop, build, and package your applications for Android. Most of these tasks, especially packaging and deployment are handled by Qt Creator providing rich developer experience.

Every time you run the application using Qt Creator, an Android Application Package (APK) is created and deployed onto the target of your choice (device or emulator). With few minor changes to packaging settings, you can publish your application on Google Play. The following instructions guide you to create an `.apk` that can go live on Google Play:

1. Open your project with Qt Creator 4.11 or later choosing a `Release Build`.
2. Select Projects > Build > Build Android APK > Create Templates to create the Android package template files such as `AndroidManifest.xml` which is the main file of concern here.
3. Check for the following settings in `AndroidManifest.xml`:
   - Set Minimum required SDK to API 21 or later.
   - Set Application name and Application icon.
   - Check the Permissions list has all the required permissions.
   - Check the Features list has the software or hardware features that your application depends on, such as GPS or NFC.

   For more information, see editing the Manifest Files in Qt Creator.

   Note: By default, Qt adds the permissions and the features based on the module dependencies of your application. If you do not want these default permissions and features, either deselect the checkboxes Include default permissions for Qt modules and Include default features for Qt modules, or remove the following part from the `AndroidManifest.xml` file:

        <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
             Remove the comment if you do not require these default permissions. -->
        <!-- %%INSERT_PERMISSIONS -->

        <!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
             Remove the comment if you do not require these default features. -->
        <!-- %%INSERT_FEATURES -->

   For information on the manifest XML format, see Android: App Manifest.

4. Set up a keystore to sign your `.apk` file. You can create a new keystore if you do not have one. For more information, see Specifying Settings for Packages in Qt Creator.
5. Locate the generated package:
   - For APK packages, locate the `.apk` package at:

          <$BUILD_DIR>/android-build/build/outputs/apk/release/android-build-release.apk

     Note: In Qt Creator, select Projects > Build > Build Steps > Build Android APK > Open package location after build to build the application's `.apk` and open the directory containing the package.

   - For AAB packages, select Projects > Build > Build Steps > Build Android APK > Build .aab (Android App Bundle) for Qt Creator to generate the `.aab` file, then locate the package at:

          <$BUILD_DIR>/android-build/build/outputs/bundle/release/android-build-release.aab

6. Log into the Google Play Developer Console and upload either of `.apk` or `.aab` files, along with a description and screen captures resembling the usage of your application.

For more information on packaging, see Deploying an Application on Android.