PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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
  • Running the test of an Android project
  • Project Go in the simulator directly
  • Project Go in the Android emulator directly
  • Project Go on the device directly
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
WINDEV Mobile allows you to develop applications for the Android operating system.
The method for developing applications for Android with WINDEV Mobile is similar to the method for developing applications for WINDEV Mobile, except for some differences. You also have the ability to run the test of the Android applications from WINDEV Mobile. Then, the created applications can be deployed. See Deploying Android applications for more details.
This help page presents:
Note: The development for the Android platform presents some specific features regarding to the development for Windows Mobile. These specific features are presented in Specific features of applications for Android.
Creating a project for Android with WINDEV Mobile

Creating an Android project with WINDEV Mobile

To create an Android project with WINDEV Mobile:
  1. Select "File .. New" and click "Project". The wizard for project creation starts.Click among the quick access buttons.
    • Click "Project" in the wheel that is displayed. The window for creating a new element is displayed: click "Project".
    • The wizard for project creation starts.
  2. 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.
  3. Add (if necessary) design documents to the project. Go to the next step.
  4. In the "Description - Type of project" step, select "Android application". Go to the next step.
  5. Indicate the location of the Android SDK (required to generate applications) to WINDEV Mobile. See Installing the Android SDK for more details.
  6. If you do not choose the automatic detection of the platform, a list of platforms is proposed to define the default size of the created windows. Then, the wizard proposes to enter the information specific to your platform. You also have the ability to choose the image used for the simulator (in test mode).
  7. 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.
  8. Specify whether you want to use the programming charter. The programming charter corresponds to a programming standard that can be applied to the entire application. This standard is used to prefix the different project elements, the variables, ... See Programming charter for more details. Go to the next step.
  9. Select the style book used if necessary. This style book will be proposed by default when creating a window and it will be applied to all the new controls. This option can be modified in the description window of the project ("Style" tab). Go to the next step.
  10. 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 run time. This language will be used to view the project at run time.
      Go to the next step.
  11. Specify whether the project must use a database or not.
    If your project is using a database, it can be an existing database or a new database. For a new database, a wizard for database creation is automatically run at the end of project creation.
  12. Validate. The created project becomes the current project.
To create an Android project with WINDEV Mobile:
  1. Click among the quick access buttons.
    • The window for creating a new element is displayed: click "Project".
    • The wizard for project creation starts.
  2. 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.
  3. Add (if necessary) design documents to the project. Go to the next step.
  4. In the "Description - Type of project" step, select "Android application". Go to the next step.
  5. 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.
  6. 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 application windows. Using anchors will allow the application to operate on all the devices.
  7. If your application is intended to operate on a single type of device, the next wizard screen allows you to select the precise model.
  8. Go to the next step.
  9. 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.
  10. Specify whether you want to use the programming charter. The programming charter corresponds to a programming standard that can be applied to the entire application. This standard is used to prefix the different project elements, the variables, ... See Programming charter for more details. Go to the next step.
  11. Select the style book used if necessary. This style book will be proposed by default when creating a window and it will be applied to all the new controls. This option can be modified in the description window of the project ("Style" tab). Go to the next step.
  12. 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 run time. This language will be used to view the project at run time. To select the default language, display the popup menu of requested language and select "Default language".
  13. Go to the next wizard step.
  14. Specify whether the project must use a database or not.
    If your project is using a database, it can be an existing database or a new database. For a new database, a wizard for database creation is automatically run at the end of project creation.
  15. Validate. The created project becomes the current project.
Notes:
  • If you have requested:
  • All the available skin templates can be used with an Android application.
  • Versions 17 and later
    The "ActivAndroid 4-HoloDark" and "ActivAndroid 4-HoloLight" skin templates allow you to use the available holographic themes from Android 4. If the application is used with an Android version that supports the holographic themes, the theme is natively used for the application. Otherwise, the WINDEV Mobile skin template and the images of the selected skin template will be used.
    New in version 17
    The "ActivAndroid 4-HoloDark" and "ActivAndroid 4-HoloLight" skin templates allow you to use the available holographic themes from Android 4. If the application is used with an Android version that supports the holographic themes, the theme is natively used for the application. Otherwise, the WINDEV Mobile skin template and the images of the selected skin template will be used.
    The "ActivAndroid 4-HoloDark" and "ActivAndroid 4-HoloLight" skin templates allow you to use the available holographic themes from Android 4. If the application is used with an Android version that supports the holographic themes, the theme is natively used for the application. Otherwise, the WINDEV Mobile skin template and the images of the selected skin template will be used.
    All the skin templates apply the holographic theme from Android 5.
    Note: 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)".
  • Use the anchors if the platform chosen for the development differs from the one used for the deployment.
    For example:
    • An application was initially created for a Nexus 7 with a resolution set to 1280 x 800. This application was installed on Galaxy Note 3 whose resolution is set to 1928 x 1080.
    • If anchors are not used, the application will not be entirely displayed on the Galaxy Note 3. Indeed, without anchoring, a control whose dimensions are set to 100x100 on the Nexus 7 will have its dimensions set to 180x180 on the Galaxy Note 3 (to get the same rendering regardless of the dpi).
    • If anchors are used, the application will be displayed properly.

Fonts used in an Android project

The projects for Android use the "Droid" fonts (Droid Sans, Droid Sans Mono and Droid Serif) in the editor. These fonts are automatically installed on the development computer when installing WINDEV Mobile.
Versions 20 and later
To use specific fonts (in edit and at run time):
  1. Display the description window of project: on the "Project" pane, in the "Project" group, click "Description".
  2. In the "Style" tab, click the "Project fonts" button. 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 into the "Fonts" sub-directory 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 editor, included in the Android application and deployed.
New in version 20
To use specific fonts (in edit and at run time):
  1. Display the description window of project: on the "Project" pane, in the "Project" group, click "Description".
  2. In the "Style" tab, click the "Project fonts" button. 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 into the "Fonts" sub-directory 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 editor, included in the Android application and deployed.
To use specific fonts (in edit and at run time):
  1. Display the description window of project: on the "Project" pane, in the "Project" group, click "Description".
  2. In the "Style" tab, click the "Project fonts" button. 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 into the "Fonts" sub-directory 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 editor, included in the Android application and deployed.
At run time, according to the mobile device and to the Android version, the font used can be a "Droid" font or a "Roboto" font.
Versions 18 and later
The struck out fonts and the underlined fonts are now supported in edit and at run time.
New in version 18
The struck out fonts and the underlined fonts are now supported in edit and at run time.
The struck out fonts and the underlined fonts are now supported in edit and at run time.
Versions 19 and later
Using the native Android fonts at run time
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)
    If the specified font is not supported at run time on the device, a substitution font will be used (Droid Sans or Roboto from Android 4.0).
New in version 19
Using the native Android fonts at run time
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)
    If the specified font is not supported at run time on the device, a substitution font will be used (Droid Sans or Roboto from Android 4.0).
Using the native Android fonts at run time
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)
    If the specified font is not supported at run time on the device, a substitution font will be used (Droid Sans or Roboto from Android 4.0).

Analysis of an Android project

The "SQLite" database must be used when creating an analysis for an Android project. It is the default database found on the Android operating system. The native access to this database is included in WINDEV Mobile. When creating an analysis for an Android project, you have the ability to use:
  • a HFSQL Classic or Client/Server database.
  • a "SQLite" database. It is the default database found on the Android operating system. The native access to this database is included in WINDEV Mobile.
When using a SQLite database, WINDEV Mobile helps you describe a connection to a SQLite database by specifying:
  • A name and a description for the connection (the name is used in programming by the 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.
Notes:
  • In a SQLite database, each data file should contain an automatic identifier (strongly recommended).
  • The Native Access for SQLite is available for the Android applications only.The Native Access for SQLite is available for the WINDEV, WEBDEV and WINDEV Mobile applications.
  • See Android application: Using and sharing data for more details.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Running the test of an Android project
Several test modes are available for the Android applications:
Note: To run the test of an application, this application must be generated beforehand. See Generating an application for Android for more details.

Project 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 is using the PC and not the Android device.
Note: During the project GO, a first project window must be defined.
Versions 21 and later
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.
New in version 21
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.
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 Go in the Android emulator directly

The Android emulator is supplied with the Android SDK.
If the application was not generated, an emulator can be created at the end of the generation wizard. By default, the created emulator corresponds to the platform information specified in the project description. Several emulators (corresponding to each phone configuration) can be created.
Once created, an emulator can be re-used by other projects.
Notes:
  • The time for starting the emulator is quite long. We advise you 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 Go on the device directly

To run this test, the specific drivers must be installed and the phone must be configured (see Preparing the Android phone to run tests for more details).
Then, the Android executable is copied onto the phone connected to the PC and run.
Note: The debugger is not attached to the application. The breakpoints are ignored.
Related Examples:
WM Registered Cross-platform examples (WINDEV Mobile): WM Registered
[ + ] 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 is used to list the files and directories found on an Android device.
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.
Android System Android (WINDEV Mobile): Android System
[ + ] This application is a tutorial example presenting some of the new features of WINDEV Mobile for Android.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- WIFI
- Bluetooth
- Toast
- Progress Bar control
- 9-image mode
- Compass
- Accelerometer
- Camera control
- LED
- Vibrations
- 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 required version
  • Version 15
Comments
Click [Add] to post a comment