ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV Mobile 2024 feature!
Help / WINDEV Mobile Tutorial / Tutorial - Deploying a mobile application
  • Deploying an Android application
  • Overview
  • Generating and distributing the Android application
  • Generating the Android application
  • Distributing an Android application
  • Overview
  • Deployment via Google Play
  • Deployment via a web server
  • Deployment from the PC
  • Copying the application to the Mobile device
  • Deployment via the Private Store provided with WINDEV Mobile

Deploying a mobile application

Deploying an Android application
We will cover the following topics:
  • Generating the Android application.
  • Deploying an Android application
Durée de la leçon 10 min
Overview
Once the development of the Mobile application is complete, you just need to compile it and install it on the device. You can:
  • test all the features of the application (maps, etc.).
  • deploy the application.
We will see how to deploy the application to an Android device.
To follow the steps in this tutorial, we will use the "WM Product Management" project.
Opening the example project
  1. Go to the WINDEV home page (Ctrl + <).
  2. On the home page, click "Tutorial", then in "Tutorial - Develop an Android/iOS application", double-click "Android/iOS product management - Answers".
Generating and distributing the Android application

Generating the Android application

To generate the Android application:
  1. If necessary, select the Android platform in the "Project explorer" pane.
  2. On the "Project" tab, in the "Generation" group, click "Generate" (you can also click Generate the Android application in the quick access buttons).
  3. The Android application generation wizard starts.
  4. If necessary, select the first window of the application (WIN_Menu, for example) and validate.
  5. The first step of the wizard is to select the application generation mode. The generation format may change depending on the mode selected.
    For this tutorial, select "Generate for free deployment (Private Store, fleet of devices, etc.)". Go to the next step.
  6. The wizard checks for the tools needed to generate the Android application.
    Android generation wizard
    The wizard shows the following options:
    • Download and automatically install the Android SDK and Gradle: in this case, you will only have to validate the license. WINDEV Mobile takes care of everything. If an update is available, the generation wizard will prompt you to perform the necessary updates. Only an Internet connection is required.
    • Use the tools automatically installed. This option is available if the tools have been downloaded and installed during a previous generation.
    • Specify the location of the tools already installed on your computer. In this case, you just need to specify the installation paths of Gradle and the Android SDK.
  7. Select the option corresponding to your configuration and go to the next step.
    Remark: If you have chosen to download and install the tools, going to the next step may be quite long and you may have to validate the license.
  8. Go to the next step by clicking the arrows at the bottom of the wizard. The next step of the wizard allows you to:
    • define the application name (displayed below the icon used to start the application) and the corresponding package.
    • select the application icon in the WINDEV Mobile image catalog ("stock" in the "Flat Soft" theme for example).
    • define the email address used by default to send an error report if necessary.
      General information
  9. Go to the next step. This step allows you to define:
    • the splash screen of the application,
    • the information saved in the manifest,
    • the application start mode (start when the device is started).
  10. Go to the next step. The wizard allows you to define the version number of the application.
  11. Go to the next step. This step allows you to sign the application. The wizard suggests a generic signature that can be used to test the application. A specific signature is required to distribute the application.
    For more details, see Generating an Android application.
  12. Go to the next step. As we have chosen to generate the application for a fleet of devices, the wizard will prompt you to choose the type of devices. Keep the default options.
    If a device is connected to the PC, use "Detect hardware automatically". Thus, next time an application is generated, this device will be automatically selected.
  13. The next step allows you to include the data files in the application. For our example, pre-filled HFSQL data files are available. They will be provided with the application. In this case, they must be specified in the "Integrate files" step.
    • Click the "Add" button.
    • Select the data files (.fic, .ndx and .mmo) in the "EXE\Android application" directory of the project. The list of files is displayed.
    • Validate.
      If your project only uses the Android platform, the files must be selected in the EXE directory of the project.
  14. Check the "Write" box for each file (required to be able to modify data from the application).
    Integrate files
  15. Go to the next step.
  16. Validate the other steps until you reach the "Configuration" step that is used to configure the options of Android SDK and the setup location.
    Configuration of SDK options
  17. Go to the next step.
  18. This step is specific to the use of Map controls. It is used to enter the key required to use the Map control. If you own a Google Maps API key, type it. Otherwise, click "Get a key".
    Configuration of the Map control
  19. Go to the next step.
  20. Finish the wizard. The generation is automatically performed in the background. Three small dots (...) appear in the WINDEV Mobile title bar to indicate that the generation is in progress. A popup window is also displayed, indicating the steps of the generation process.
    Generation in progress
  21. Once the generation is completed, the popup window allows you to copy and run the application directly on the device connected to the computer or on an emulator ("Deploy").
    Completed generation
  22. A new window appears, allowing you to select the runtime device. If an Android device is connected to the development computer, select this device.
If the device is not connected to the development computer, you must:
  1. Connect the device to the development computer.
  2. In the explorer, open the generation directory of the apk file corresponding to the Android application: on the "Home" tab, in the "General" group, expand and select "Browse generation directory".
  3. Copy the apk file into the "Download" directory of device.
  4. Unplug the device.
  5. Start the application for file management on the device.
  6. Go to the "Download" directory and run the apk file. The application is automatically installed.
Distributing an Android application

Overview

WINDEV Mobile allows you to develop Android applications.
Once the applications are created, developed and checked, all you have to do is deploy them. Several deployment modes are available:
  • Deployment via Google Play (or another market).
  • Deployment to a web server.
  • Deployment from the PC via ADB.
  • Deployment by copying the apk file.
  • Deployment via the Private Store provided with WINDEV Mobile.

Deployment via Google Play

Google Play is an online service used to download applications (free of charge or not) on mobiles devices compatible with Android.
Once published, the application can be downloaded by the users all around the world via the Google Play application installed on their phone.
The publication of applications on Google Play must comply with specific rules:
  • To publish an application for the first time, you must create a developer account on Google Play. Once registered, you have the ability to publish or update as many applications as you want as many times as necessary.
  • The published application must be signed with a private cryptographic key. You have the ability to sign your own application: using a third-party organism is optional. The validity period of the certificate must end after October 23, 2033.
    The applications generated by WINDEV Mobile are automatically signed using the information provided in the generation wizard ("Application signature" step) with a sufficient validity period.
    Caution: The published application must not be signed with a generic key (whose use must be limited to the tests in GO mode).
  • An icon must be associated with the application. The generation wizard of WINDEV Mobile allows you to define the icon to use.
    Remark: Google Play is the best-known application, but there are also other apps.

Deployment via a web server

You can make Android applications available for download via a link on a web page.
To do so, you must:
  1. Copy the "apk" file to the web server that hosts the page from which the application will be downloaded.
    Reminder: the "apk" file is created by WINDEV Mobile when generating the Android application.
  2. Add a link in the download web page. This link has the following format:
    <a href='Path of the apk file on the server'>Link</a>
  3. On the server, add the following MIME type: application/vnd.android.package-archive
The user will only have to display the page with the browser of the phone. The application will be downloaded when the link is clicked. Then, simply click the downloaded file (in the download manager) to install the application.
Caution: The "Unknown sources" option must be enabled on the phone to allow this setup mode. To enable this option, refer to your phone's documentation.

Deployment from the PC

Applications can be deployed from the PC directly via the Android Control Center.
Caution: USB debugging must be enabled to use the Android Control Center. Otherwise, the phone will not be detected by the Android Control Center.
To enable USB debugging:
  1. On the phone, go to "Settings".
  2. Select "About phone".
  3. Tap "Build Number" multiple times to enable the developer mode.
  4. Go back to the previous menu.
  5. The "Developer Options" entry appears. Select this option.
  6. Check "USB debugging".
Remark: The actions to perform may change across phone versions and manufacturers. For example, in a Samsung Galaxy phone, you must "tap" the "Version number" multiple times in the "About Phone" option to enable "Developer Options". In any case, a Google search with "usb debugging <device name>" allows you to get the operating mode adapted to the device used.
To deploy an Android application via the Android Control Center:
  1. Connect the phone to the PC.
  2. Start the Android Control Center: on the "Tools" tab, in the "Mobile Tools" group, click "CCAndroid".
  3. Go to the "Application" tab. This tab lists the applications installed on the device and allows you to install a new application (APK file on the PC).

Copying the application to the Mobile device

The easiest way to install an Android application on a mobile device is to copy the apk file to the device and run it. The following operations must be performed:
  1. Connect the device to the PC by USB.
  2. Copy the apk file of the application to the device (external memory, for example).
    Reminder: the "apk" file is created by WINDEV Mobile when generating the Android application.
  3. On the device, use a file explorer to go to the directory where the apk file was copied and click the file to start its setup.
Remark: Not all devices come with file browsers, but there are many available for free.
Caution: The "Unknown sources" option must be enabled on the phone to allow this setup mode. To enable this option, refer to your phone's documentation.

Deployment via the Private Store provided with WINDEV Mobile

With this method, the application can be deployed internally to a fleet of devices. You will be able to manage updates and versions on this fleet of devices.
For more details, see Private Store for mobile applications.
Table of contents
Minimum version required
  • Version 2024
Comments
Click [Add] to post a comment

Last update: 11/17/2023

Send a report | Local help