|
- Overview
- Creating a project for Android with WINDEV Mobile
- Creating an Android project with WINDEV Mobile
- Fonts used in an Android project
- Analysis of an Android project
- Testing an Android project
- Project test (Go) in the simulator directly
- Project test (Go) in the Android emulator directly
- Project test (Go) on the device directly
Developing applications for Android
WINDEV Mobile allows you to develop Android applications. The method for developing applications for Android with WINDEV Mobile is very simple. You can test Android applications directly from WINDEV Mobile. Once created, the applications can be deployed. For more details, see Deploying Android applications. This help page presents: Creating a project for Android with WINDEV Mobile Creating an Android project with WINDEV Mobile To create an Android project with WINDEV Mobile: - Click
in the quick access buttons. - The new element window appears: click "Project".
- The project creation wizard starts.
- Choose the type of project to create: "Android or iOS application". Go to the next step of the wizard.
- Select the platform of the project you want to create. You can create:
- a Android/iOS cross-platform project: this project already contains both Android and iOS platforms and can be run on either platform.
- an Android-only project: this project will only contain the Android platform.
- an iOS-only project: this project will only contain the iOS platform.
To create an Android project, select "Android only".. Go to the next step of the wizard. - Specify whether the new project should be blank or based on an example.
Remark: If the project is based on an example, select the example to use. - Go to the next step of the wizard.
- The wizard proposes to choose the type of Android devices affected by the project:
- Generate an application for phones and tablets.
- Generate an application for phones only.
- Generate an application for tablets only.
- Generate an application for a specific device.
- If your application is intended to operate on several Android devices (phones with different sizes or with different resolutions), we advise you to use one of the first three options. In this case, WINDEV Mobile proposes the smallest resolution to create the windows of the application. Using anchors will allow the application to operate on all the devices.
- If your application is intended to operate on a single type of device, the next wizard screen allows you to select the precise model.
- Go to the next step.
- Choose the name and location of your project. You have the ability to enter a short description of the project. Go to the next step.
- Add (if necessary) design documents to the project. Go to the next step.
- Specify whether this project must be included in the Source Code Manager (SCM). The Source Code Manager simplifies teamwork and it can also be useful if you are working on your own. Go to the next step.
- Indicate if you want to use the code style. The code style corresponds to a programming standard that can be applied to the entire application. This standard is used to prefix the different project elements, variables, etc, ... For more details, see Code style. Go to the next step.
- Select the style book used if necessary. This style book will be proposed by default when creating a window and applied to all new controls. This option can be modified in the project description window ("Style" tab). Go to the next step.
- Select:
- the supported languages. These languages will be proposed by default as soon as an option of an element (control, window, ...) can be translated.
- the default language at runtime. This language will be used to view the project at runtime. To select the default language, open the context menu of requested language and select "Default language".
- Go to the next step of the wizard.
- Specify whether the project must use a database.
If so, your project can use an existing or a new database. If you use a new database, a database creation wizard starts automatically once the project has been created. - Validate. The created project becomes the current project.
Remarks: - If you have requested:
- All the available skin templates can be used with an Android application.
- All the skin templates apply the holographic theme from Android 5.
Remark: To use the "Material Design" theme, in the "General" tab of the description of the Android configuration, check "Apply the Material Design theme to the native controls and to the Info/Error/Dialog windows (requires Android 5.0 or later)".
Fonts used in an Android project Par défaut, les projets pour Android utilisent sous l'éditeur les polices "Droid" (Droid Sans, Droid Sans Mono et Droid Serif) et les Roboto. Ces polices sont automatiquement installées sur le poste de développement lors de l'installation de WINDEV Mobile. Utilisation des polices natives Android/iOS en exécution Les polices suivantes peuvent être utilisées : - Droid Sans -> toutes versions d'Android
- Droid Sans Mono-> toutes versions d'Android
- Droid Serif -> toutes versions d'Android
- Roboto -> à partir d'Android 4.0 (Ice Cream Sandwich, api level 14)
- Roboto Condensed -> à partir d'Android 4.1 (Jelly Bean, api level 16)
- Roboto Light -> à partir d'Android 4.1 (Jelly Bean, api level 16)
- Roboto Thin -> à partir d'Android 4.2 (Jelly Bean MR1, api level 17)
Lors de la définition du style d'un champ, il est possible de choisir d'autres polices, installées sur le poste de développement. Si la police spécifiée n'est pas supportée en exécution sur l'appareil, une police de substitution sera utilisée (Droid Sans ou Roboto à partir d'Android 4.0). Des problèmes d'affichage peuvent alors survenir. New in version 28Remarque : Si une police personnalisée est utilisée dans le projet sans avoir été intégrée dans le projet, une erreur d'UI est affichée. Pour utiliser des polices spécifiques (en édition comme en exécution) : - Affichez la fenêtre de description du projet : sous le volet "Project", dans le groupe "Project", cliquez sur "Description".
- Dans l'onglet "Avancé", cliquez sur le bouton "Polices du projet".
- Dans la fenêtre qui s'affiche, ajoutez les polices voulues (bouton "Ajouter" permettant d'ajouter des fichiers au format "TTF" ou "OTF"). Les fichiers correspondant à la police seront copiés dans le sous-répertoire "Fonts" du projet.
ATTENTION : Vous devez disposer des droits nécessaires pour la diffusion des polices sélectionnées. - Validez les différentes fenêtres.
Les polices sélectionnées seront disponibles sous l'éditeur de fenêtres, intégrées dans l'application Android et iOS puis déployées. Ces polices sont également disponibles sous l'éditeur d'états. Vérifiez que les polices ajoutées gèrent l'alphabet de votre application et qu'elles sont redistribuables.
Lors de la sélection d'une police dans le style d'un champ, les polices intégrées apparaîtront en tant que police disponible pour la plateforme et en tant que police personnalisée.
Analysis of an Android project When creating an analysis for an Android project, you have the ability to use: - an HFSQL Classic or Client/Server database.
- an "SQLite" database. It is the default database found on the Android operating system. The Native Connector to this database is included in WINDEV Mobile.
When using an SQLite database, WINDEV Mobile helps you describe a connection to an SQLite database by specifying: - A name and a description for the connection (the name is used in programming with functions such as HOpenConnection).
- The advanced parameters of the connection:
- The name of the file containing the database (in SQLite, the entire database is contained in a single file whose extension is.db in most cases).
- The directory containing the database.
Remarks: - In an SQLite database, each data file should contain an automatic identifier (strongly recommended).
- The Native Connector for SQLite is available for WINDEV, WEBDEV and WINDEV Mobile applications.
- For more details, see Android application: Using and sharing data.
Testing an Android project Several test modes are available for Android applications: Project test (Go) in the simulator directly This test starts a WINDEV Mobile test window in which the application for Android is run. This test allows you to use the debugger. However, several differences can be noticed compared to a real execution. Indeed, the simulation uses the PC and not the Android device. Remark: During the project test (GO), a first project window must be defined. If the application is available for phones and tablets, a first window can be defined for the phones and another one can be defined for the tablets. Project test (Go) in the Android emulator directly The Android emulator is supplied with the Android SDK. To use an emulator, you must first create it in Android Studio (refer to the Android Studio documentation for more details). If the emulator has been created, it will automatically appear in the list of available devices for testing via the "GO" option. Remarks: - The emulator may take a long time to start. It is recommended not to close the emulator between 2 project tests.
- The debugger is not attached to the application. The breakpoints are ignored.
- This type of test does not take the speed of the phone into account. The test takes the speed of the development computer into account.
- Some WLanguage functions are not available in the emulator. The documentation of the different functions indicates whether the function can be used in the emulator. The functions fail when they are not available.
Project test (Go) on the device directly Then, the Android executable is copied onto the phone connected to the PC and run. Remark: The debugger is not attached to the application. The breakpoints are ignored.
Related Examples:
|
Cross-platform examples (WINDEV Mobile): WM Attendance
[ + ] This application is an attendance manager. It allows you to list the persons who attended a meeting. The database is filled beforehand with the list of registered persons. You have the ability to find a person by using his/her name. The following topics are presented in this example: 1/ using a browsing looper based on a query 2/ using a database in HFSQL format.
|
|
Cross-platform examples (WINDEV Mobile): WM FTP Client
[ + ] This example is an FTP Client for Android and iOS. It explains how to interact with an FTP server via the FTP functions of WLanguage. It is used to: - Rename files - Delete files - Create folders - Download files - Send files to the server
|
|
Android (WINDEV Mobile): Android Explorer
[ + ] This example is a file explorer for Android. It allows you to list, delete, rename files and directories on an Android device. It also allows you to create directories.
|
|
Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS. It is used o: - list the contacts found on the phone - call the contacts - send SMSs to the contacts - ...
|
|
Cross-platform examples (WINDEV Mobile): WM Managing Orders
[ + ] The WM Managing Orders example is a simplified management of orders and invoices. This example is used to: - create/modify/delete a product, - create/modify/delete a customer, - contact a customer by email, - see the history of the actions performed for a customer - place an order, print an order form, - invoice an order, print an invoice.
|
|
Cross-platform examples (WINDEV Mobile): WM RSS Reader
[ + ] This example is a reader of RSS stream for the Android and iOS devices. This application allows you to follow the features of your favorite streams. This reader supports the images containing a post as well as the links toward an external site. Furthermore, it also included a system for managing the favorites.
|
|
Cross-platform examples (WINDEV Mobile): WM Password
[ + ] Web sites, bank accounts, ... passwords are everywhere in out life. With WM Password, no need to store all the passwords of your different accounts. The application stores all your passwords in a secure way. WM Password can also generate secure passwords for you.
|
|
Cross-platform examples (WINDEV Mobile): WM Notes
[ + ] This example is using the drawing functions of WLanguage for Android and iOS. It allows you to draw graphic "notes" and to save them.
|
|
Android (WINDEV Mobile): Android Speech Synthesis
[ + ] This educational example explains how to manage the recognition and the speech synthesis Android. The speech synthesis is performed by using either the WLanguage functions, or an external JAR file included in the WINDEV Mobile project.
|
|
Cross-platform examples (WINDEV Mobile): WM System
[ + ] This application is an example of some of the features of WINDEV Mobile available for Android/iOS. The following system functions are used: - NFC - Multimedia control - Brightness - Volume - Wi-Fi - Bluetooth - Toast - Compass - Accelerometer - Camera control - LED - Vibration - Notifications - Drawing functions - Internet
|
|
Cross-platform examples (WINDEV Mobile): WM Sports
[ + ] This example is a sport application used to save your performances. The application calculates the distance, the time, the average speed and the number of calories spent according to the sport. The run is displayed on a map control via markers and an itinerary. The example also includes a server part used to synchronize the user data. This webservice is available in the WEBDEV "WW_Sports" example.
|
|
Cross-platform examples (WINDEV Mobile): WM Expense Account
[ + ] This example allows you to manage your fees. Let's see the main features of this application: - The input of invoices - Management of foreign currencies - Inclusion of photo document for the invoices - Ability to email the expense account - Ability to track the expense accounts - ...
|
|
Cross-platform examples (WINDEV Mobile): WM Stocks
[ + ] This application is used to perform stocktaking and to save the results in a database. The example is used to create entries/exits in the stock, by directly scanning the bar code of products. It is optimized to be run on tablets.
|
|
Android (WINDEV Mobile): Android Inventory
[ + ] This application is used to perform inventories and to save the results in a database.
|
|
|
|
|
|
|
|