|
|
|
|
|
- Overview
- Implementing the User Groupware in a mobile application
- Step 1: Server configuration
- Step 2: Enable the User Groupware in a configuration of your mobile project
- Step 3: Configure users and rights
- Step 4: Test the application
Mobile User Groupware (Android and iOS)
WINDEV Mobile includes a User Groupware for Android and iOS applications. It's very simple to use: - When the application is started, a specific window allows users to log in (or create a new account).
- When the login window is validated, the application checks the login credential by querying a Webservice.
- If the login credentials are 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: Server configuration Two cases may occur: - If you are using a PCSCloud platform: the required elements are installed by default on your platform.
Reminder: PCSCloud is a paid, turnkey solution. For more details, see PCSCloud. - If you are not using a PCSCloud platform: install the following elements:
- an HFSQL server,
- the reserved server, including the modules for the Mobile User Groupware (WDBaaS).
For more details, see Configuring a BaaS server (User Groupware and Private Store).
Step 2: Enable the User Groupware in a configuration of your mobile project To enable the User Groupware in a configuration of your WINDEV Mobile project: - Open your project in WINDEV Mobile.
- If necessary, select the project configuration in which the User Groupware should be enabled.
- On the "Project" tab, in the "Project" group, click "GPU / Private Store".
- In the description window of the current project configuration, in "User Groupware: Disabled", click "Change".
- In the window that appears, in the "General" tab:
- Enable MBaaS: click "Enabled".
- Select the desired feature: "GPU: Management of user access rights".
- In "GPU and Private Store application server (webservice and administration site)", indicate the server to be used. In the case of a new server, select the type of server:
- PCSCloud platform. In this case, specify the characteristics of your PCSCloud platform.
Reminder: This option allows you to use a Web server, a dedicated server and an HFSQL Client/Server engine already installed and configured. - 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.
- Specify the type of deployment:
- Accounts 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.
- Application-specific accounts: 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.
- 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. Upon validation, the modules installed with the reserved application server are automatically configured. - In the "Administration" section, you can reset the administrator account password on a production server ("Reset administrator account password" button). Simply connect to the server.
- In the "GPU" tab, specify:
- The User Groupware customization mode:
- "Default login window (recommended)": WINDEV Mobile takes care of everything. Simply start the application to use the User Groupware.
- "Customize login window": 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.
- The User Groupware start mode:
- Automatic start: The User Groupware login window is started before any other window of the application. The project initialization code is executed once the login window is opened and validated.
- Manual start: The login window will only be opened if gpwOpen is used. This option can be used to execute the project initialization code 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.
- How users log in to the application:
There are two options: - 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.
- The security options:
- Allow new users to create an account: This option allows new users to create an account (not allowed by default).
- Enable Sign in with Apple in iOS: This option requires an App Store certificate and is not available if the "MDM" feature has been selected.
- Allow opening windows and reports by default: This option allows all users to open windows and reports by default. In this case, simply specify which elements will not be accessible when configuring the rights.
- Number of days allowed in 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).
- In the "Options" tab, specify:
- The texts used in the emails sent to users to validate their registration and to manage forgotten passwords.
Remark: The parameters of the server used to send emails must be specified in the User Groupware management site. - The file language: By default, data files specific to the User Groupware are in English, but you can use data files in French.
- 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 (User Groupware with custom login window).
- 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 username and password.
Step 3: Configure users and rights To configure users and rights: - Start an administration site via one of the links in the "General" 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. Enter "supervisor" for both the username and password.
- You can:
- define the different users, rights and login modes.
- define the SMTP server parameters used to send the different emails (registration validation, etc.).
Remarks: - 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:
- Validation of the user groupware configuration window.
- Launching the application in test mode.
- Generating the application.
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.
Step 4: Test the application To test the application: - Test the project via 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 username 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. Remark: - 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.
To change the database used (user and test or production rights database) through programming, use: - a manual start of the User Groupware.
- the gpwOpen function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|