- Implementing the user groupware in a mobile application
- Step 1: HFSQL server and reserved server setup
- Step 2: Enable the user groupware in your mobile project
- Step 3: Configure users and rights
- Step 4: Run the application test
Mobile User Groupware (Android and iOS)
WINDEV Mobile now offers a user groupware for Android and iOS applications.
It's very simple to use:
- When the application is started, a login screen asks users to authenticate themselves (or to create a new account).
- When the login screen is validated, the application checks the login information by querying a Webservice.
- If the login information is correct, users can use the application with the rights they have been granted. A local rights database is copied to the mobile device, allowing a subsequent connection, even in offline mode.
Implementing the user groupware in a mobile application
Step 1: HFSQL server and reserved server setup
The following must be installed on a computer to use the mobile user groupware:
- An HFSQL server.
- A server reserved for the user groupware.
- The reserved server must be installed on a Web server. A Web server (IIS, Apache, ...) must be installed on the computer.
- The HFSQL server and the reserved server can be installed on two different computers.
- The reserved server can be installed on a Web server that also hosts a WEBDEV application server.
HFSQL Server setup
The HFSQL server setup program is available in the WINDEV or WINDEV Mobile setup package. If you do not own this setup package, the HFSQL server setup can also be found in our site (http://www.windev.com
To install the HFSQL server from the WINDEV/WINDEV Mobile setup package:
- Start the WINDEV/WINDEV Mobile setup program.
- Select "HFSQL server setup".
- Then, select "Install or update an HFSQL server".
- Accept the license agreement.
- Choose the platform ("For Windows on this computer").
- If HFSQL servers are already installed on the current computer, select "Install a new server".
- Select the setup directory and specify the server name and port. The port 4900 will be used by default.
- Specify the name and password of the user with management that will be created by default on the HFSQL server. By default, this user is "Admin" and has no password.
- Install (if necessary) the HFSQL Control Center if this one is not found or accessible from your computer.
- The wizard proposes to configure the sending of notifications in order to identify the server dysfunctions in real time. Select the desired option.
- The wizard proposes to enable the authentication via Active Directory. Enable this option if necessary.
- Validate (or not) the participation in product improvement by allowing us to collect information regarding the use of product. This optional and anonymous collect allows PC SOFT to improve the product features.
- The setup is performed. By default (if you have not changed the administrator settings), to connect to the server in administrator mode, you must use the "Admin" user without a password.
Remark: For security reasons, don't forget to change the administrator password.
Reserved server setup (WDBaaS)
The User Groupware server is a WEBDEV application server reserved for the user groupware.
To install the user groupware server:
- Launch the setup pack of the reserved server (file WX26 0PACKRSRV.exe available in the subdirectory "Install\WDServeurR" of the setup directory of WINDEV Mobile).
- Validate the license.
- Select the module to install: "Install modules of mobile user groupware (WDBaaS)". Go to the next step.
- Select (if necessary) the version of the reserved application server to install (32 or 64 bits). Go to the next step.
- Select the setup directory. Go to the next step.
- Specify the characteristics of the HFSQL server used for the user groupware (previously installed):
- Name of HFSQL server,
- Name and password of administrator of HFSQL server. This information is necessary to automatically configure the database of the user groupware and the associated user.
- Test the connection to check your parameters.
- Specify the parameters specific to the database used by the user groupware:
- the name of the database dedicated to the user groupware ("GPU", by default).
- the user name and password of the user groupware administrator.
- This database and its user will be automatically created.
- Go to the next step.
- The wizard checks if there is a Web server on the setup computer.
- If no Web server is installed on the setup computer, the wizard proposes to install one and to configure it in order to use the server reserved for the user groupware.
- If there is a web server on the setup computer, the wizard proposes to configure it to use the server reserved for the user groupware.
- At the end of the setup, the wizard displays a summary:
Copy and store this information. This login and password for the mobile user groupware server must be used in the user groupware configuration window in your WINDEV Mobile project.
To connect to the mobile user groupware server,
use the following parameters:
- Login: xxx
- Password: xxxxx
For information, the parameters HFSQL connection used are as follows:
- Server: xxx
- Database: xxxx
- User: xxx - Password: xxx
The password for the user groupware files is: xxxx
- Finish the wizard.
Remark: If the database name is incorrect, you can restart the setup of the server reserved for the user groupware to specify the correct database name while keeping the identifiers.
Step 2: Enable the user groupware in your mobile project
To enable the user groupware in your WINDEV Mobile project:
- Open your project in WINDEV Mobile.
- On the "Project" pane, in the "Project" group, click "User groupware".
- In the window that appears, select the "Integration" tab if necessary:
- Enable the user groupware with the options:
- "Standard user groupware (recommended)": WINDEV Mobile takes care of everything. Simply start the application to use the user groupware.
- "Custom user groupware": All elements of user groupware are included in your project via an internal component. You can customize the different elements of the user groupware. However, the evolutions of the product will not be integrated.
- In "User Groupware application server (webservice and administration site)", specify the server to use. In the case of a new server, select the type of server to use:
- Local, network or Internet server with the protocol used. Enter the server name, user and password. This information was provided to you during the setup of the server reserved for the user groupware.
- PCSCloud platform. In this case, specify the characteristics of your PCSCloud platform. (Not available in this version).
- Specify the type of deployment used:
- Dedicated database per application: This deployment mode uses a dedicated database for identifiers and rights for each application that uses the user groupware. This deployment mode is recommended for deployment on the store.
- Database shared between applications: This deployment mode uses a common database for the identifiers and rights of the User Groupware. This deployment mode is recommended for inter-enterprise deployment.
- The URLs of administration sites are automatically filled in with the information previously specified.
CAUTION: The specified URLs will only work when the user groupware configuration window is validated. Indeed, when this window is validated, the modules installed with the reserved application server are automatically configured.
- In the "Options" tab, configure:
- The User Groupware start mode:
- Auto run: The login window of user groupware is started before any other application window. The initialization code of project is run once the login window is opened and validated.
- Manual start: The login window will be opened only if gpwOpen is called. This option is used to run the initialization code of project before opening the login window. This option is useful for a multilingual application for example: a window can be displayed to ask for the application runtime language.
- The user connection mode:
- Display login window only at first start: The login window will only be displayed at the first start. The information entered for the first connection will be automatically reused for future connections.
- Authentication at each start: The login window appears at each start. Biometric authentication can be enabled in this case.
- Offline mode: The "Offline" mode is implemented when the user cannot use the authentication webservice. In this mode, users who were previously connected to the application can still use the application. Indeed, a file with the user's characteristics and rights is copied locally at each connection with authentication. You can define the number of days allowed in offline mode (0 by default).
- Management of new users: You can allow new users to create an account (not allowed by default).
- In the "Email" tab, specify:
- The settings of the email sending server: To manage user registration and forgotten passwords, an email is sent to users. To do this, it is necessary to specify the parameters of the SMTP server used.
- The texts used in the emails sent to users to validate their registration and to manage forgotten passwords.
- Validate the user groupware management window.
Caution: When the user groupware window is validated, the following actions are performed:
- Addition of the internal component with the user groupware windows (custom user groupware).
- Declaration of the current application in the application server reserved for the user groupware.
- Activation of user and rights management sites.
- Update of the XML file that contains the description of the application windows on the server.
- Definition of a default user, with "supervisor" as login and password.
Step 3: Configure users and rights
To configure users and rights:
- Start an administration site via one of the links in the "Integration" tab of the user groupware management window:
- URL that corresponds to the deployed application. The users and passwords defined will be used when the application is deployed.
- URL that corresponds to the test mode. The users and passwords defined will be used during a test on the phone ("Go").
- Log in to the administration site. Use the login "supervisor" with the password "supervisor".
- You can define the different users, their rights and connection mode.
- Only the "Supervisor" can access the user and rights management site.
- A specific banner lets you know if the user and rights management site is used in test mode.
- The list of the different windows and controls of the application are updated on the server (for use in rights management) during the following actions:
To manage a new window in the user rights, it is necessary to generate the application to see the window appear in the rights management site.
- Validation of the user groupware configuration window.
- Launching the application in test mode.
- Generating the application.
Step 4: Run the application test
To run the application test:
- Run the project test using the quick access buttons.
- In Android, the test is performed via the simulator or on your mobile.
- In iOS, the test is performed via the simulator or on your mobile using WMDEV.
- Log in using the login and password defined in the test administration site. The application will use the database with users and test rights.
The application is deployed in the same way as all Android or iOS applications. The deployed application will use the database with the users and deployment rights.
To change the database used (user and test or production rights database) by programming, use:
- When the application is launched in test mode (Go in simulator, or Android emulator, or WMDev), the database with users and test rights is automatically selected.
- After deploying an APK on a device or in an Android emulator, the database with users and production rights is automatically used.
- a manual start of the user groupware (On the "Project" pane, in the "Project" group, click "User groupware", then in the "Runtime" tab, click "Manual start".
Click [Add] to post a comment