|
|
|
|
- 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 Durée de la leçon](https://doc.windev.com/en-US/images/image.awp?langid=3&name=dur%E9e.png&0) 10 min 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
- Go to the WINDEV home page (Ctrl + <).
- 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: - If necessary, select the Android platform in the "Project explorer" pane.
- On the "Project" tab, in the "Generation" group, click "Generate" (you can also click
in the quick access buttons). - The Android application generation wizard starts.
- If necessary, select the first window of the application (WIN_Menu, for example) and validate.
- 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. - The wizard checks for the tools needed to generate the Android application.
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.
- 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. - 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.
- 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).
- Go to the next step. The wizard allows you to define the version number of the application.
- 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. - 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.
![](https://doc.windev.com/ext/images/us/note_v2.png?478445243) 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. - 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.
![](https://doc.windev.com/ext/images/us/note_v2.png?478445243) If your project only uses the Android platform, the files must be selected in the EXE directory of the project.
- Check the "Write" box for each file (required to be able to modify data from the application).
- Go to the next step.
- Validate the other steps until you reach the "Configuration" step that is used to configure the options of Android SDK and the setup location.
- Go to the next step.
- 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".
- Go to the next step.
- 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.
- 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").
- A new window appears, allowing you to select the runtime device. If an Android device is connected to the development computer, select this device.
![](https://doc.windev.com/ext/images/us/note_v2.png?478445243) If the device is not connected to the development computer, you must: - Connect the device to the development computer.
- 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". - Copy the apk file into the "Download" directory of device.
- Unplug the device.
- Start the application for file management on the device.
- 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: - 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. - 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> - 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. ![](https://doc.windev.com/ext/images/us/note_v2.png?478445243) 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: - On the phone, go to "Settings".
- Select "About phone".
- Tap "Build Number" multiple times to enable the developer mode.
- Go back to the previous menu.
- The "Developer Options" entry appears. Select this option.
- 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: - Connect the phone to the PC.
- Start the Android Control Center: on the "Tools" tab, in the "Mobile Tools" group, click "CCAndroid".
- 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: - Connect the device to the PC by USB.
- 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. - 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|