Windev Mobile Concepts Us PDF
Windev Mobile Concepts Us PDF
Windev Mobile Concepts Us PDF
To quickly and efficiently learn how to use WINDEV Mobile, we advise you to work in the
following order:
1
Reading the "Concepts".
This guide presents the main concepts required for creating a WINDEV Mobile
application.
2
"Tutorial" (guide + exercises).
The tutorial provides a first "hands-on" approach to WINDEV Mobile. It allows you
to familiarize yourself with the main editors of WINDEV Mobile.
3
Test of examples.
Run the test of the examples supplied with WINDEV Mobile in the fields you are
interested in.
Remember to visit the download section of www.windev.com on a regular basis to
The online help, accessible by Internet from http://doc.windev.com or installed with
check whether upgraded versions are available.
WINDEV Mobile, allows you to quickly find the syntax of a WLanguage function, to get
help about the interface... For each programming theme, you will find a description of the
associated feature and the list of corresponding WLanguage functions.
Email address of our Free Technical Support: [email protected].
Note: If a difference exists between the guides and the online help, follow the instructions
given in the online help.
This documentation is not contractually binding. Modifications may have been made
to the software since this guide was published. Please check the online help. We hope you enjoy getting started with WINDEV Mobile.
All product names or other trademarks mentioned in this publication are registered trademarks of their
respective owners.
© PC SOFT 2020: This publication may not be reproduced in part or in full without the express consent of
PC SOFT.
Introduction 3
Summary
Part 1 - Basic concepts
Project and Analysis............................................................................................................... 9
Development cycle of an application................................................................................. 10
WINDEV Mobile: Android, iOS, UWP, ..................................................................................12
The Android, iOS and Mobile windows, .............................................................................13
Android and iOS windows...: Characteristics......................................................................14
The layouts...........................................................................................................................15
Available controls in a window............................................................................................ 16
Menus of applications ........................................................................................................19
Internal window....................................................................................................................20
Window templates............................................................................................................... 21
Control templates.................................................................................................................22
Reports.................................................................................................................................23
Report templates................................................................................................................. 24
Part 3 - Databases
Analysis: Database structure..............................................................................................45
The different types of accessible files................................................................................46
Data handled by a WINDEV Mobile application.................................................................48
HFSQL Classic......................................................................................................................49
HFSQL Client/Server............................................................................................................50
HFSQL Cluster...................................................................................................................... 51
Creating HFSQL files: the physically created files..............................................................52
Associating controls with data............................................................................................53
The queries...........................................................................................................................55
The embedded queries........................................................................................................56
4 Summary Summary 5
The Table/Looper controls.................................................................................................. 57
Synchronizing data..............................................................................................................59
PART 1
3-tier...................................................................................................................................... 61
Basic
Part 5 - Interactions between WINDEV and WINDEV Mobile
WLanguage functions..........................................................................................................73
concepts
Handling character strings.................................................................................................. 74
Part 6 - Setup
Installing an Android or iOS application, ...........................................................................79
The different types of setup................................................................................................80
Part 7 - Communication
Communication with WINDEV Mobile................................................................................. 87
Managing the emails (POP3/IMAP/SMTP)........................................................................89
Handling files on an FTP server..........................................................................................90
Managing SMSs................................................................................................................... 91
Part 9 - Appendices
Component supplied with WINDEV Mobile......................................................................113
Examples supplied with WINDEV Mobile..........................................................................114
6 Summary
Project and Analysis
The development of a mobile Application (Android, iOS, ...) with WINDEV Mobile is based
on two main elements: the Project and the Analysis.
A WINDEV Mobile analysis groups the description of the data files found in the application.
Project 1
Analysis
Project 2 Project N
Test and
Conception Development generation Deployment
Testing and Generating the setup
Specifications Creating the project debugging program
the application
Generating the
Final test
UML modeling Creating the analysis application :
- Windows Mobile
- Android First setup:
- iOS on the device, by HTTP,
Importing Development
- Universal Windows via Google Play Store,
existing files - Project RAD
10 App
- Window RAD via MarketPlace, ...
- Queries
- Reports Updating the application
- Input of source code Synchronizing the
data deployed
Design step: An application can be designed from specific requirements, from UML Test and generation step: WINDEV Mobile proposes several automatic test tools to
modeling of processes or even from existing data files. guarantee the reliability of applications and to make sure that no regression occurs
between the development steps.
Development step: The creation of the project and analysis is performed via very extensive
wizards. The development can be done in RAD mode (Rapid Development Application) Deployment step: Deploying a WINDEV Mobile application can be done according to
with automatic generation of the code and GUI or it can result from the manual creation several methods: on Mobile directly, by download, via Play Store, MarketPlace, App Store
of project elements. or Windows Store. In any case, the HFSQL data files (if they exist) will be automatically
updated according to the evolutions made in the application.
• Windows CE (5 and 6). Several features enable you to easily obtain intuitive and user-friendly applications
among which:
• Universal Windows Platform apps. • powerful controls.
• an anchoring mechanism allowing the UI to automatically adapt to the size of the
• Android version 5 and later. display. This mechanism is useful when developing mobile applications because it is
used to adapt to the different resolutions of the devices.
• iOS version 11 and later. • an UI compilation system with detection of errors (empty titles, untranslated
captions, overlap, etc.).
The following processors are supported:
iPhone/iPad
Android
To create a layout, on the "Window" pane, in the "Layouts" group, expand "Layouts"
and select "Add layouts". The wizard for layout creation starts and it asks you several
questions in order to create the necessary number of layouts. When the different layouts
are created, you have the ability to change the positioning of controls on one or more
Managing the display resolution
layouts in order to get the requested interface.
The windows created with WINDEV Mobile for the Android applications
automatically adapt to the screen resolution of devices at run time. At run time, the initial layout is automatically chosen according to the platform, the
orientation and the size of screen. The layout is automatically modified when the device
switches from portrait mode to landscape mode for example.
Edit control
Calendar
Select a value from a list (country, city, currency, ...)
Image
Chart Android/iOS
In Android and iOS, the menus are
displayed in the Action Bar.
Different buttons correspond to the
available actions.
Progress bar
Windows Mobile
The menus are displayed at the bottom
of the window.
Program an action in a window (display another window, start a The menu options can easily be
print, ...)
selected with the stylus of the device or
Button with a finger.
To create the main menu, on the
"Windows" pane, in the "Bars and
menus" group, expand "Main menu"
Group the controls by theme and display the themes one by one and select "Add the main menu".
Tab, Toolbox
Source of Print
report mode
Printer
Query Report (PCL format,
(Report editor) Windows Mobile)
The report templates are used to easily standardize the layout of your reports.
Development
environment
Defining a report template in the
report editor.
The project dashboard includes several indicators about the project content:
• statistics about the project,
• incidents,
• tasks,
• status of automatic tests,
• result of audits,
• list of elements checked out from SCM (Source Code Manager),
• result of action planes (continuous integration), ...
The elements found in this dashboard are presented in Widget format. These Widgets
can be configured, moved, enabled, disabled, ... You have the ability to add new indicators.
The dashboard configuration is saved for each user. The dashboard configuration is the
same for all the projects that belong to the same user.
All the elements, except for the GUI (pages and windows), are 100% compatible and
sharable between the WINDEV, WEBDEV and WINDEV Mobile projects.
Indeed, the sets of procedures or the classes can be shared between several projects Mobile project
for example.
Regardless of the product used to create a project, the project can be opened by the
other products.
When a project is opened in a product other than
the one that was used to create it, a wizard is
displayed, allowing you to create a project
configuration specific to the product used.
The multiple generation allows you to generate all the project configurations (or some of
them) in a single operation.
Note: If you own WINDEV and WINDEV Mobile, you have the ability to handle the WINDEV
Mobile configurations in WINDEV directly. You can open the mobile windows, modify
them, run their test, ...
To start a multiple generation, on the "Project" pane, in the "Generation" group, click
"Multiple generation".
Remark: To organize your projects while sharing a set of elements between different
projects, WINDEV Mobile also proposes internal components.
Overview
To simplify teamwork, a Source Code Manager is available in WINDEV Mobile. This Source
Code Manager allows several developers to work together on the same project at the
same time and to share elements between several projects. Local Computer 1
Network
2
Project A
Check-out 9:57 Project A
(intranet) Version 1 Version 1
ADSL
3 Modification
4
Version 2
5
Version 3
1
has a local copy of the elements required for the development Check out Alpha window from
Project A Version 1 at 9:57
Check in modified Alpha window
The elements found in the SCM can be shared: Project A Check-out 9:57 into Project A Version 2 at 10:41
• via a network, Version 1
6
Local Computer 2
• via Internet, Modification Check out Alpha window from
for end users Project A Version 2 at 14:28
• via the Cloud,
Check-in 18:32
• in offline mode. In this case, the elements that require specific attention will be Project A
Version 3
Mobile Computer
7
checked out from SCM when the laptop is connected to the main system for Check in modified Beta window
into Project A Version 3 at 18:32
example.
If a project element (window, report, ...) is checked out, this element cannot be checked
out twice.
Once the checked-out elements are modified, these elements must be checked back in
so that these modifications can be taken into account by the source project. Indeed, the
SCM database stores a history of all the project elements since their creation.
Whenever an element is checked back in, the version number of the source project is
incremented by 1.
1
Project 2
1
Creating the Developing the
internal component component
Windows
2 Generating the
component
2 Sharing the
internal component
Classes via the SCM
.WDK file
3 Importing the
component
Sub-directory of
WCI file WINDEV Mobile WINDEV Mobile WINDEV Mobile
<MyComponent>
(List of elements) project project project
project
4 Using the
component 4 Using the
component 4 Using the
component
Android applications
WINDEV Mobile allows you to generate applications for the Android
platform. These applications will be able to run on smartphones
or tablets running this operating system (from version 4.0). These
applications can also be distributed on Play Store for example.
iOS applications
WINDEV Mobile allows you to generate applications for the iPhone
and iPad platform (from iOS 8). These applications will be able to
run on iPhone and iPad devices. These applications can also be
distributed on the Apple Store for example.
1 2
- Tasks
Creating requirements Performing the
- Requirements
- Quality made of: requirements:
Project
Monitoring Center
Incidents
Login window
Database of of WINDEV Mobile
Control Centers
Defining the
Business Rules
When the relevant project is opened, the Project Monitoring Center requests or indicates
the current task. As soon as a task is completed, all you have to do is indicate that this Using the application
task is over and specify the new task.
A task can be linked to a project element (window, report, ...). Whenever the relevant
element is opened, the time spent on this element is counted and stored in the Project
Monitoring Center. Conversely, the element corresponding to the task that you want to
perform can be automatically opened from the task list.
Each developer can also see his own task list in the "Project Monitoring Center" pane
found in the editor.
Databases
System studied
Corresponding analysis
The analysis of a WINDEV Mobile project corresponds to the LDM (Logical Data Model).
The entire structure and data organization are described: the data is grouped by file.
Each file contains several data called item.
In the analysis, the description of a data file can be linked to a type of file (HFSQL Mobile,
HFSQL Client/Server, SQLite, ...).
Hxxx
functions,
(read, write...)
Database
48 Part 3: Databases Part 3: Databases 49
HFSQL Client/Server HFSQL Cluster
A WINDEV Mobile HFSQL application can also operate in Client/Server mode. HFSQL Cluster is an extension of the database model of HFSQL Client/Server. In a database
cluster, all HFSQL servers contain a copy of databases and they are synchronized in real
The characteristics of the Client/Server mode are as follows: time.
• A HFSQL Client/Server application is run on different mobile devices (called client • The read load can be balanced between the different servers.
computers). • The physical configuration can evolve without any interruption for the client
• The data files are found on a server. Only the server physically accesses the data computers.
files. • If one of the servers crashes, the client is automatically redirected to an operating
• All the processes (query, read/write operation in a data file, ...) are performed on the server.
server.
Mobile Device 1
Client computer
Windows or Linux
HFSQL server
Mobile Device 2 Access to data
Manta server
Cluster
HFSQL
Client/Server HFSQL Client/Server HFSQL Client/Server
server server
databases
Mobile Device N
Applying modifications
HFSQL Client/Server can be used on the Windows Mobile, iPhone, iPad, Android and
HFSQL Cluster can be used from the Windows Mobile, iPhone, iPad and Android platforms,
Universal Windows 10 platforms.
...
".mmo" file
One or more "Memo" items
Memo file Link between control and item
ScreenToFile FileToScreen
Database
ScreenToFile FileToScreen
Linked variable
Simple control
Link with:
Sources Possible uses
- Simple variable
- Instance of class or Windows and controls
structure member of a window
- Property of dynamic object Data coming from
one or more files
List box, Table, Combo box, ...
Link with: (HFSQL, Oracle, ...) Reports
- Array of classes or structures The result of a
- Advanced types (for example
xlsRow, xlsColumn)
query can be used
Programming
like a file
(use in the WLanguage
functions)
Note: In programing, a query can be handled like a data file. Especially, it can be
associated with a display control (a Table control for example) that will present the data
returned by the query.
Embedded query:
MyWindow_1$Query
Customer
file
The displayed data that is not linked to the data file is not kept when displaying the row
(value of a Check Box column for example).
The WLanguage functions starting with "Table" are used to handle the browsing Table
controls with direct access. Adding or deleting a row into/from the Table control triggers
the addition or deletion of the record in the linked data file.
In this case, the query is integrated in the window. It is found in the WDW file corresponding
to the window. If the WDW file is copied (into another project for example), the embedded
queries used by this window will also be copied.
Data in
memory
The data being found in memory, the Table control allows you to perform all the operations
on the data (sort on any column, search performed in the columns, ...).
Notes:
These different fill modes are also available for the List Box and Combo Box controls.
File 1
The Table control is not available in the Universal Windows 10 apps File 3
File 1
The reason for separating the layers is to simplify the maintenance and the future
evolutions of the application. This provides better security because the access to the
database is allowed via the processes layer only. It also optimizes the teamwork and the
multi-target development.
The synchronization can be adapted to special cases. For example, you have the ability to
retrieve the records regarding a specified product or the records created at a given date,
manage the conflicts, display a configuration window, ...
These changes must be done by programming via HRplFilterProcedure.
Advanced
concepts
62 Part 3: Databases
Windows generated by RAD
The RAD (Rapid Application Development) is used to create windows from:
• the analysis linked to the project,
• skin templates.
The generated windows contain the necessary source code. The test of these windows
can be immediately run with the data found on the development computer.
Note: For the Windows Mobile applications, the RAD can be used to
entirely create the application (with or without code).
1
this test. This test allows you to use the debugger. However, this test being
Choose the languages run on a PC and not on the real mobile device, some differences regarding
- Project the application behavior may be noticed.
- Analysis
3
does not require a real Android device to run the tests but it provides a
Programming Data files
more faithful execution than the "simulator" mode.
- Choose the application language - Choose the character set
(Nation function) (ChangeCharset function)
- Choose the character set - Take the character set into account when
(ChangeCharset function) creating the files (HCreation* function) • Test on iPhone/iPad simulator. The test of the iOS application can be
- Choose the keyboard language - Take the character set into account when directly run on Mac when compiling the project in Xcode. This option does
(ChangeKeyboard function) reindexing (HIndex function)
not require a real iPhone or iPad device to run the tests but it provides a
more faithful execution than the "simulator" mode.
4 Executable
Choose the library languages
• Real test (PC or mobile device). The test of Universal Windows 10 App
application can be run on a Windows 10 computer. This option allows you
to run your project in tile mode, from Windows 10. The Universal Windows
10 App application is automatically generated.
5 Setup program
- Available languages • Test and debug on the Mobile Device (Pocket PC) connected to the
- Translate the setup program development computer. This test allows you to use the debugger even
though it is run on the Mobile Device directly.
3 3
ones that require digitally signed executables).
This mode is slightly slower than the simulator. Indeed, it adds to WLanguage code of test scenario Result of the test
the execution a communication phase between the development
environment and the debugger found on the device. Correction
This mode requires a mobile device connected to the development
computer.
To create a unit test on the current window, on the "Automatic tests" pane, in the "Tests"
group, expand "New" and select "Save a new test".
To create a unit test on a procedure or on a class, select this procedure or this class in the
"Project explorer" pane and select "Unit tests .. Create a unit test" from the popup menu.
WINDEV/WINDEV
Mobile
Interactions
The following diagram presents some WLanguage functions that can be used according
to the type of application developed:
Common
functions
for example,
HReadFirst,
FileToScreen,
ExtractString...
WINDEV functions
for Windows
only
Functions not available
due to limitations of
the Mobile Device
S is string UNICODE
... string
Using Text files
Using Text files
fOpen(MyFile,ANSI) ANSI
fOpen(MyFile,ANSI) UNICODE fReadLine(...) string
fReadLine(...) string
ANSI ANSI
or or
fOpen(MyFile,Unicode) UNICODE
fReadLine(...) string
fOpen(MyFile,Unicode) UNICODE
UNICODE fReadLine(...) string
UNICODE
In Windows Mobile, when using text files containing character strings in
ANSI format, WINDEV Mobile automatically converts these character
strings into UNICODE/UTF-16 format. This conversion is performed even
if the opening of this file in ANSI format is explicitly requested. The method for programming the character strings is the same in WINDEV and in
This conversion is completely transparent. WINDEV Mobile (with very few exceptions). WINDEV automatically performs the
necessary conversions.
Setup
Setup in APK format App Store is an application proposed by Apple. App Store presents applications for
This setup consists in: iPhone and iPad that can be purchased or downloaded from a unique setup interface
• generating the application on the development computer. and included in the Apple devices.
• signing the APK file digitally. This setup consists in:
Note: a self-signed key can be used. • generating the application on the development computer.
• copying the APK file onto an Android device. • preparing the images required for the deployment.
• running the APK file on the Android device. This action triggers the setup of the • compiling the application in XCode.
application. • saving the application in "iTunes Connect".
• compiling the application in XCode.
To run the application, all you have to do is choose its icon from the "All programs" menu.
• uploading the application on the App Store.
The users of the application will only have to install the requested application from the
Setup via Play Store "App Store" application of their Apple device.
Play Store (formerly Android Market) is an application proposed by Google. Play Store To run the application, all you have to do is choose its icon from the "All programs" menu.
presents applications for Android that can be purchased or downloaded from a unique
setup interface included in the Android devices. Setup by adhoc and in-house
This setup consists in:
• generating the application on the development computer. This type of deployment allows you to distribute your application on an iPhone or iPad
• signing the APK file digitally. For a deployment on Play Store, we recommend that device.
you use a real key signed by a recognized trusted authority. Most of the operations will be performed on the Web, then in the "Apple developer
• uploading the APK file onto the Web site of Play Store. center", then in the XCode compiler on a Mac.
Note: you must register on the site beforehand. Depending on your iOS development license, you will have the ability to perform one of
The users of the application will only have to install the requested application from the the following setups:
"Play Store" application of their Android device. • adhoc, for installing the application on several devices (up to 100).
• in-house, to install an application on all the devices belonging to the company. The
To run the application, all you have to do is choose its icon from the "All programs" menu.
application will be distributed either via a private Web server of the company, or by
iTunes.
To run the application, all you have to do is choose its icon from the menu of applications.
Creating the Starting the
executable (Exe) setup
Starting the Connection
Setup in CAB format Delivery
setup
SETUP
Creating the
executable (Exe)
To use this application, run this executable on the Mobile Device (double-click the ".EXE"
file for example).
Development computer Direct copy
Creating the
Deployment executable (Exe) Direct COPY
• running this setup program on the Windows Mobile devices. This program installs all
the files required by the application. Development
Deployment
To use this application, start the application on the Windows Mobile device (via the
shortcut created in the "Start" menu).
Communication
84 Part 6: Setup
Communication with WINDEV Mobile
WINDEV Mobile proposes several communication functions in several fields.
These functions allow you to:
• manage emails (POP3, IMAP and SMTP protocols),
• use FTP (file transfer),
• perform HTTP and HTTPS requests,
• use the telephony,
• perform SOAP queries (to access SOAP, J2EE or.Net Webservices),
• manage SMSs,
• use TCP sockets (with automatic use of the SSL protocol), UDP sockets,
• use Infrared or Bluetooth sockets.
The availability of these functions depends on the features of the device that runs the
application.
Some examples
1. Communication by Infrared
Communication by infrared is performed via the Socket functions (SocketConnectInfrared,
SocketCreateInfrared, ...). Therefore, the Windows Mobile devices or the Android devices
can communicate with all types of devices.
Notes:
FTP account • The POP3 and IMAP protocols are used to receive emails.
• The SMTP protocol is used to send emails.
Anonymous
POP3 protocol
Receiving emails Email server
3. Communication by mobile network (3G, ...) (Hosting company)
SMTP protocol Retrieving and
The communication by mobile network can be used to access a remote HFSQL database Sending emails sending emails
via Internet for example.
PC Mobile Device
INTERNET
INTRANET
Principle
1. Connect the Windows Mobile device to a PC (required if it is not natively equipped with
an Internet access).
2. Connect to the Internet service provider (if necessary).
GPRS GPRS 3. Start an email session with EmailStartSession.
4. Send and read the messages.
Connection to Internet 5. Close the messaging session with EmailCloseSession.
(NetOpenRemoteAccess function)
Connection to the remote database
(HConnectRemoteAccess function)
Anonymous
SMS
Transfer files by WI-FI
(FTPxxxx functions, ...)
Connection to the server
(FTPConnect function)
Application
2 Sending the message
(SMSSend function) SMS
Specific features
of Windows
Mobile
92 Part 7: Communication
Managing the keyboard in Windows Mobile
To allow the users of your applications to type data, the keyboard of Mobile device must
be used (also called SIP for "Software Input Panel"). This keyboard is used to:
WINDEV Mobile allows you to easily manage this keyboard via the WLanguage functions
(SIPXXX functions).
94 Part 8: Specific features of Windows Mobile Part 8: Specific features of Windows Mobile 95
File picker in Windows Mobile Standard CEDB database
File picker The standard applications
In Windows Mobile, fSelect is used to select a file found: The devices in Windows mobile are supplied with a set of standard applications that
• in the "\My Documents" directory or in one of its sub-directories. handle the standard CEDB databases.
• in a directory found on a storage card. These databases correspond to the databases found by default on the device. These
databases contain the "Tasks", "Contacts" and "Calendar" data files, ...
Mobile Device
Databases of
standard applications
96 Part 8: Specific features of Windows Mobile Part 8: Specific features of Windows Mobile 97
Handling a standard database found on the Mobile Device (from a PC) Handling custom CEDB databases
A standard database (containing the data files for managing tasks, contacts, ...) is found
on the Mobile Device (Pocket PC). This database can be handled by a WINDEV Mobile CEDB database
application. The custom CEDB databases correspond to Access databases (".MDB" file) previously
If you own WINDEV, you also have the ability to create a WINDEV application used to exported from a PC.
handle this standard database found on the Mobile Device (Pocket PC). When an Access database (".MDB" file) is copied onto a Mobile Device (Pocket PC) from
These operations are performed via the cdbXXX functions. the file explorer, this database is automatically changed into a CEDB database (".CDB"
The synchronization between the database found on Mobile Device (Pocket PC) and the file).
data viewed via Outlook is performed by ActiveSync.
Handling a CEDB database from the Mobile Device (Pocket PC).
Windows PC Mobile Device A CEDB database can be handled by a WINDEV Mobile application. These operations are
performed via the cdbXXX functions.
Connection: USB, Wi-Fi, Bluetooth...
database
Standard
Notes
Synchronization via ActiveSync Contacts...
.cdb
Mobile Device
cdbxxx
functions
Outlook
(read,
write...)
Note: To handle a Mobile Device database (Pocket PC) from a WINDEV application, the cdbxxx
Windows PC must be connected to the Mobile Device (ceConnect function). functions
(read, write...)
Database
98 Part 8: Specific features of Windows Mobile Part 8: Specific features of Windows Mobile 99
Handling a CEDB database from the Windows PC Synchronizing a CEDB database with an Access database
An Access database (".MDB" file) is found on the Windows PC. This database is exported
If you own WINDEV, you also have the ability to create a WINDEV application used to to the Mobile Device (Pocket PC): ActiveSync automatically transforms it into a database
directly handle a CEDB database found on the Mobile Device (Pocket PC). These for Mobile Device (".CDB" file).
operations are also performed via the cdbXXX functions. This database for Mobile Device (Pocket PC) can be handled by a WINDEV Mobile
application.
If you own WINDEV, you also have the ability to create a WINDEV application used to
Windows PC Mobile Device
handle the database found on the Mobile Device (Pocket PC).
Connection: USB, Wi-Fi, Bluetooth... These operations are performed via the cdbXXX functions. The synchronization between
the database found on the Mobile Device (Pocket PC) and the Access database is
performed by ActiveSync.
cdbxxx functions (read, write...)
Database
Windows PC Mobile Device
cdbxxx
functions Connection: USB, Wi-Fi, Bluetooth...
(read,
write...)
cdbxxx functions (read, write...)
Database
Synchronization via ActiveSync
cdbxxx
functions
Note: To handle a database found on a Mobile Device (Pocket PC) from a WINDEV (read,
write...)
application, the Windows PC must be connected to the Mobile Device (ceConnect
Database
function).
Notes:
• To handle a database for Mobile Device (Pocket PC) from a WINDEV application, the
Windows PC must be connected to the Mobile Device (ceConnect).
• The WINDEV application can also handle the Access database via the Native
Access.
• From Windows Vista, "ActiveSync" was replaced by the "Manager for Windows
Mobile devices".
100 Part 8: Specific features of Windows Mobile Part 8: Specific features of Windows Mobile 101
Comparison between HFSQL and CEDB File link between a window and a Pocket PC database (CEDB)
This link must be defined by programming (cdbXXX functions).
To display information coming from a database in a window, the controls of this window
must be linked to the different items of the database.
The method for displaying and retrieving information depends on the database used
(HFSQL or CEDB). Mobile Device
cdbWriteCol("MyDatabase",... ctlCaption=cdbCol("MyDatabase",...
"Schedule","Caption",ctlCaption) "Schedule","Caption")
HFSQL
cdbWriteCol("MyDatabase",... ctlContrib=cdbCol("MyDatabase",...
"Schedule","Contrib",ctlContrib) "Schedule","Contrib")
... ...
1 LINE
PER WINDOW
(File link)
ScreenToFile FileToScreen
Other differences
The use of HFSQL databases (Classic or Client/Server) allows you to access the following
features (non-exhaustive list):
• Speed of the HFSQL database.
• Queries on the HFSQL databases (created with the query editor supplied with the
product).
• Fast application development via Full Application RAD.
• Features specific to the HFSQL database (encryption, ...).
102 Part 8: Specific features of Windows Mobile Part 8: Specific features of Windows Mobile 103
Interaction with a WINDEV application Handling a Windows Mobile device
The functions for accessing the Mobile Devices (Pocket PCs) are used to access the from a WINDEV application
Mobile Devices (Pocket PCs) from a WINDEV application.
The following WLanguage functions are used to access the Windows Mobile devices
connected to a PC from a WINDEV application:
Mobile Device
ceConnectionStatus Used to find out the status of the connection between the current computer
Windows PC and a Windows Mobile device.
ceConnect Connects the current computer to a Windows Mobile device.
Files
Connection: USB, Wi-Fi, Bluetooth... ceCopyFile Copies:
• a file found on the current computer to the connected Mobile Device.
Copying files • a file found on the connected Mobile Device to the current computer.
WINDEV Mobile
application
Starting applications • a file found on the connected Mobile Device to another directory in the
Mobile Device.
cdbxxx access (read, write...)
Database
ceDeleteFile Deletes a file from the Windows Mobile device connected to the current
computer.
ceDir Finds a file or a directory on the Windows Mobile device connected to the
WINDEV Mobile is supplied with several examples that use the functions for accessing current computer.
the Mobile Devices:
ceDisconnect Closes the connection between the current computer and the device.
• PC Registry.
• PC Explorer. ceFileDate Returns or modifies the different dates associated with a file (creation,
modification or access).
These examples can be used on a PC.
ceFileExist Checks the existence of a file.
ceFileSize Returns the size (in bytes) of a file found on the Windows Mobile device
connected to the current computer.
ceFileTime Returns or modifies the different times associated with a file (creation,
modification or access).
ceListFile Lists the files found in a directory (and in its sub-directories) and returns the
number of listed files.
ceMachineName Returns the name of Windows Mobile device.
ceMakeDir Creates a directory on the Windows Mobile device connected to the current
computer.
ceOEMInfo Returns OEM information about the Windows Mobile device: make, model,
serial number, ...
104 Part 8: Specific features of Windows Mobile Part 8: Specific features of Windows Mobile 105
cePowerStatus Used to get information about the main or secondary battery of Windows
Mobile device.
Synchronization software:
ceProcessorType Returns the type of processor on the Windows Mobile device connected to
ActiveSync, ...
the current computer.
Several programs can be used to synchronize data (WINDEV application, email, calendar,
ceRegistryCreateKey Creates a key in the device registry. contacts, tasks, notes, ...) between a PC and a Mobile Device (Pocket PC):
ceRegistryDeleteKey Deletes a sub-key from the device registry.
• ActiveSync, for versions up to Windows XP.
ceRegistryDeleteValue Deletes a value from the device registry. In most cases, ActiveSync is supplied with the Mobile Device (Pocket PC) but it can
also be downloaded from InternetActiveSync is automatically started on PC when
ceRegistryExist Checks the existence of a key in the device registry. connecting the Mobile Device to PC. The data to synchronize is configured in
ceRegistryFirstSubKey Identifies the key found after the specified key in the registry of the Windows
ActiveSync ("Options" icon).
Mobile device.
ceRegistryListValue Returns the name (and possibly the type) of the values for a registry key of
the Windows Mobile device.
ceRegistryNextKey Identifies the key found after the specified key in the device registry.
ceRegistrySubKey Identifies the path of the specified Nth sub-key in the registry of the Windows
Mobile device.
ceRemoveDir Deletes a directory from the Windows Mobile device connected to the
current computer.
ceRunExe Starts the execution of a program (an executable for example) from the
• the "Manager for Windows Mobile devices", available from Windows Vista. This
current application.
manager is automatically started when connecting the Mobile Device to PC.
ceSysDir Returns the path of a system directory on the Windows Mobile device
connected to the current computer.
ceWindowsVersion Returns information about the Windows version used on the Windows
Mobile device connected to the current computer.
ceWinEnum Used to enumerate the Windows windows currently opened on the Windows
Mobile device.
ceWinTitle Returns the title of the specified Windows window.
ceXRes Returns the horizontal resolution of the screen on the Windows Mobile
device connected to the current computer.
ceYRes Returns the vertical resolution of the screen on the Windows Mobile device
connected to the current computer.
Note: these functions are WINDEV functions and not WINDEV Mobile functions.
106 Part 8: Specific features of Windows Mobile Part 8: Specific features of Windows Mobile 107
Managing emails (CEMAPI) Using a specific user account
To use another user account, you must define one.
CEMAPI is an API for email management used by most of the applications for Mobile If the Mobile Device (Pocket PC) has no direct link to Internet, a synchronization with the
Device (Pocket PC) to send and receive emails (Pocket Outlook in most cases). PC is required to send and receive the emails.
CEMAPI simplifies the management of emails received by the hosting company. When an
email is read, it is automatically loaded in the local message box and deleted from the
server (at the hosting company). Mobile Device PC
All the characteristics required to manage the emails (POP3 protocol, SMTP protocol,
remote access, etc.) are grouped in the "User Profile".
Connection: USB, Wi-Fi, Bluetooth...
With the email functions of WLanguage, a WINDEV application can directly handle the Pocket
emails managed in an application that is using "CEMAPI". Outlook Retrieving
and sending emails
Other
Accounts
If the Pocket PC has a direct access to Internet (by Wi-Fi, ...), no synchronization with a PC
is required.
Retrieving and
sending emails
Email server
(Hosting company)
108 Part 8: Specific features of Windows Mobile Part 8: Specific features of Windows Mobile 109
Tools supplied with WINDEV Mobile PART 9
Specific tools are available for handling a Mobile Device (Pocket PC) from a PC:
WDExplorer
Tool used to view the files and directories found on a Mobile Device (Pocket PC), un
Smartphone, ...
Appendices
WDRegistry
Tool used to view the registry of a Mobile Device (Pocket PC), Smartphone, ...
• components that can be used from a WINDEV application that handles the files
found on Mobile Device (Pocket PC).
These components are found in the "Components\Example components\Windows"
sub-directory of setup directory of WINDEV Mobile.
Android Explorer This example is used to list the files and directories found on an Android WM Expense account This example is used to enter your expense reports and to take a snapshot
device. in order to follow up.
Android GPS This example presents the use of the GPS functions of WLanguage in an WM Food The WM Food example explains how to interact with the OpenFoodFacts
Android application. database from a WINDEV Mobile application via the webservice proposed
by this database.
Android Inventory This application is used to draw up inventories and to save the results in a
database. WM FTP Client This example is an FTP Client.
WM Gallery Control This example shows how to use the “Image Gallery” control.
Android Persistent This example is used to create persistent notifications that appear even if the
Notifications application is not used anymore.
WM Geo-localization This example explains how to manage proximity searches with geolocation:
Android Speech This educational example shows how to manage voice recognition and • search around me.
Synthesis synthesis on Android. • search in a city, at a given address, near an address.
The speech synthesis is performed by using either the WLanguage functions, The results are displayed in a looper and in a map with markers.
or an external JAR file included in the WINDEV Mobile project.
WM HTML Dialog This example explains how to dialog with an HTML control.
Android System This application is an educational example presenting some functions specific It is using the WLanguage “ExecuteJS” function and the Javascript “WL.
to Android. Execute” function.
Android ZIP This example is used to browse the folders of the Android device to find ZIP
archives. WM Managing Contacts This example presents the management of contacts for Android and iOS.
WM Registered This application is an attendance manager. It is used to identify the people Pocket Loan This example is used to simulate loans and to view the corresponding
attending a meeting. amortization tables.
WM RSS Reader This example is a reader of RSS stream for the Android and iOS devices. This Pocket Managing Contacts This example presents the management of contacts on Mobile Device
application will allows you to follow the news of your favorite streams. (Pocket PC) and it is using the loopers, the queries, the sending of SMSs
and emails, the phone call.
WM Shopping This option is used to manage several shopping lists. Pocket Map This example is a light version of WDMap. This example is used to view
WM Sports This example is a sport application used to save your performances. and modify the data files in HFSQL Mobile format on a Mobile Device
(Pocket PC) directly.
WM Stocks This application is used to draw up inventories and to save the results in a
database. Pocket Notes This example is used to draw graphic “notes” and save them. You have the
ability to enter keywords to identify your notes.
WM Tic Tac Toe This example presents the famous “Tic Tac Toe”.
Pocket Telephony This example is a telephony application that can be used on a Mobile
Device (Pocket PC) equipped with phone access (GSM type).
WM ToDo List This example is a manager of To-Do Lists.
Pocket Virtual Keyboard This example proposes virtual keyboards that can be fully customized and
certainly smaller than the standard keyboard of Mobile Devices (Pockets
Examples that can be used in UWP only PC).
UWA Notes Application for managing notes. Pocket ZIP This example is used to create and handle archives (“.ZIP” files).
UWA Orders This training example presents, via a management of orders, the proper use of
GUI when developing Universal Windows Platform Apps applications. Examples containing a project that can be used on Mobile Device (Pocket
UWA Password Application for managing passwords. PC) and that interacts with a project that can be used on PC
UWA Stopwatch This example explains how to create a stopwatch. • Beach Booking. These examples are used to manage the
• “Pocket Beach” project that can be used on bookings for private beaches.
You have the ability to synchronize the data
Examples that can be used on a Mobile Device (Pocket PC) only Mobile Device (Pocket PC).
typed in the two projects.
• “PC Beach” project that can be used on PC.
Pocket _NET This example uses a Mobile .NET assembly (OpenNETCF.Net) in order to
retrieve the list of WIFI network cards available on a PDA and to retrieve • Expense Reports. These examples are used to manage the
connection information about these cards. expense reports.
• “Pocket ExpenseReports” project that can be
used on Mobile Device (Pocket PC). You have the ability to synchronize the data
Pocket Attendance This application is an attendance manager. It is used to identify the people
typed in the two projects.
attending a meeting. • “PC ExpenseReports” project that can be
Pocket Click on Chart This example proposes a solution used to offset the sections of a Pie chart used on PC.
via a simple click.
PC Explorer This example is used to view the files and directories found on Mobile Device
(Pocket PC).
PC Photo Album This example is used to import and/or export the photos found on a Mobile
Device (Pocket PC) from a PC.
PC Registry This example is used to handle the registry of a Mobile Device (Pocket PC)
from a PC.