ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing for Android
  • 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
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
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:
Remark: There are specific aspects related to the development process for Android. These specific features are presented in Specific features of Android applications.
Creating a project for Android with WINDEV Mobile

Creating an Android project with WINDEV Mobile

To create an Android project with WINDEV Mobile:
  1. Click New in the quick access buttons.
    • The new element window appears: click "Project".
    • The project creation wizard starts.
  2. Choose the type of project to create: "Android or iOS application". Go to the next step of the wizard.
  3. 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.
  4. 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.
  5. Go to the next step of the wizard.
  6. 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.
  7. 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.
  8. If your application is intended to operate on a single type of device, the next wizard screen allows you to select the precise model.
  9. Go to the next step.
  10. 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.
  11. Add (if necessary) design documents to the project. Go to the next step.
  12. 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.
  13. 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.
  14. 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.
  15. 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".
  16. Go to the next step of the wizard.
  17. 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.
  18. 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

By default, Android projects use Droid (Droid Sans, Droid Sans Mono and Droid Serif) and Roboto fonts in the editor. These fonts are automatically installed along with WINDEV Mobile on the development computer.
Using native Android/iOS fonts at runtime
The following fonts can be used:
  • Droid Sans -> all Android versions
  • Droid Sans Mono-> all Android versions
  • Droid Serif -> all Android versions
  • Roboto -> from Android 4.0 (Ice Cream Sandwich, api level 14)
  • Roboto Condensed -> from Android 4.1 (Jelly Bean, api level 16)
  • Roboto Light -> from Android 4.1 (Jelly Bean, api level 16)
  • Roboto Thin -> from Android 4.2 (Jelly Bean MR1, api level 17)
You can choose other fonts installed on the development computer when defining the style of a control.
If the device does not support the specified font at runtime, a substitution font will be used (Droid Sans or Roboto from Android 4.0). This can lead to display problems.
Remark: If a custom font is used in the project, but has not yet been integrated, a UI error is displayed.
To use specific fonts (in the editor and at runtime):
  1. Open the project description window: on the "Project" tab, in the "Project" group, click "Description".
  2. In the "Advanced" tab, click the "Project fonts" button.
  3. In the window that is displayed, add the requested fonts ("Add" button used to add files in 'TTF" or "OTF" format). The files corresponding to the font will be copied to the "Fonts" subdirectory of the project.

    CAUTION: You must have the necessary rights to distribute the selected fonts.
  4. Validate the different windows. The selected fonts will be available in the window editor, integrated into the Android and iOS applications and deployed. These fonts are also available in the report editor. Make sure that the added fonts support the charset used in your application and that they are redistributable.
When selecting a font in the style of a control, the fonts that have been integrated will appear as available for the platform and as a custom fonts.

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:
Remark: To run the test of an application, this application must be generated beforehand. For more details, see Generating an Android application.

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

To run this test, the specific drivers must be installed and the phone must be configured (for more details, see Preparing the Android phone to run tests).
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:
WM Attendance 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.
WM FTP Client 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 Explorer 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.
WM Managing Contacts 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
- ...
WM Managing Orders 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.
WM RSS Reader 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.
WM Password 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.
WM Notes 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 Speech Synthesis 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.
WM System 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
WM Sports 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.
WM Expense Account 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
- ...
WM Stocks 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 Inventory Android (WINDEV Mobile): Android Inventory
[ + ] This application is used to perform inventories and to save the results in a database.
Minimum version required
  • Version 15
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help