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". Proceed 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".. Proceed to the next step of the wizard.
  4. The wizard proposes to select the type of devices affected by the project: phone and/or tablet.
    Remark: If the application is intended for multiple Android devices (phones with different screen sizes or resolutions, for example), WINDEV Mobile shows the smallest resolution by default to create the application windows. You can use anchors to adapt the application to any device.
  5. Select the desired style book. This style book will be available by default when creating a window or report, and will be applied to all new controls. This option can be modified in the project description window ("Style" tab). Go to the next step.
  6. Specify the project name and location. These options cannot be modified. The project corresponds to a ".WPP" file for WINDEV Mobile. This file can be opened by WEBDEV and WINDEV. For more details, see Common project.
    All the objects associated with the project will be created in the specified directory.
  7. Finish the wizard. The new project is opened in the editor. This project has a specific "Android application" configuration. You can edit this configuration or create a new one at any time. For more details, see Project configuration.
Once a project has been created, you can:
  • change the project configuration options. For more details, see Project configuration.
  • associate one or more documents with the project. These documents can be text files, images, scanned documents, etc.. For more details, see Associating documents with the project.
  • associate one or more analyses with the project. For more details, see Project analysis.
  • integrate the project into the Source Code Manager (SCM). The Source Code Manager simplifies teamwork, but can also be helpful for individual work.
  • define a code style. The code style is a programming standard that can be applied across the entire application. This standard is used to prefix the different project elements, variables, etc. For more details, see Code style.
  • specify the languages supported by the project. These languages will be available by default when translating text from an element (control, window, page report, etc.). For more details, see Multilingual project.
Remarks:
  • 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 appears, add the desired fonts (click the "Add" button to add 'TTF" or "OTF" files). 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 be available as 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: 06/19/2024

Send a report | Local help