ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV Mobile 2024 feature!
Help / WINDEV Mobile Tutorial / Tutorial - My first Android/iOS application
  • Lesson 2 - First application tests
  • Overview
  • Project configurations
  • First Android test
  • Types of tests
  • Test in the simulator
  • First iOS test
  • Tests available for iOS
  • Testing the window in the simulator
  • Testing the window directly on the device
  • To sum up

My first Android/iOS application

Lesson 2 - First application tests
We will cover the following topics:
  • Project configurations.
  • Android configuration: My first Android test.
  • iOS configuration: My first iOS test.
Durée de la leçon 1 h
Overview
In the previous lesson, we created our first cross-platform project, with its first window. In this lesson, we will test the application on both Android and iOS.
Project configurations
In the previous lesson, we created a project that can run on both Android and iOS. WINDEV Mobile automatically associated two project configurations to the project, each corresponding to a platform.
What are project configurations used for?
Project configurations are used to define the different types of generations supported by the project: Android, iOS, component, etc.
The project elements can be:
  • common to several configurations (a window used in iOS and Android for example).
  • specific to a configuration (a class used by a component for example).You can work on a specific configuration at any time: the elements that do not belong to this configuration will be grayed out in the project editor.
For more details, see Project configuration.
You can check the different project configurations in the "Project explorer" pane:
  1. Expand "Configurations (iOS application)" at the top of the "Project explorer" pane.
  2. The two configurations are displayed:
  3. To select a specific configuration, double-click the desired configuration.
To test a WINDEV Mobile application, select the project configuration that corresponds to the desired platform.
Let's use the project we developed in the previous lesson. We will test our first window in each project configuration.
First Android test

Types of tests

With WINDEV Mobile, you can test an Android application using different methods.
You can test your application:
  • in the WINDEV Mobile simulator.
    This test simulates an Android device on the development computer. This test is useful when the developer does not have an Android device. However, this test does not allow using the hardware components of the device (GPS, SMS, camera, etc.).
  • in the Android emulator (AVD) provided with the SDK.
    For more details, see Test with Android emulator.
  • directly on the phone.
    In this case, you need to generate the application. We will see how to generate an Android application in Deploying an Android application.
In this lesson, we will test the window of the Android application. This test can only be run in the simulator.

Test in the simulator

We will test the WIN_Welcome window in the simulator, in an Android configuration.
  1. Select the Android configuration of your project:
    • Expand "Configurations (iOS application)" at the top of the "Project explorer" pane.
    • Double-click the name of the Android configuration.
  2. Click Test window in the quick access buttons (or press F9).
  3. Close the simulator information message.
  4. The window you created is executed.
  5. Click "Display".
  6. Validate the system window that appears.
    Window test
To close the simulator:
  1. Click the "x" icon in the menu above the simulator box.
  2. The WINDEV Mobile editor appears again.
First iOS test

Tests available for iOS

WINDEV Mobile offers different types of iOS application tests.
You can test your application:
  • in the WINDEV Mobile simulator.
    This test simulates an iOS device on the development computer. This test is useful if the developer does not have a Mac or an iOS device to compile the application. However, this test does not allow using the hardware components of the device (GPS, SMS, camera, etc.).
  • directly on the phone, using the WMDev application.
    This test is useful when the developer does not have a Mac to compile the application. All the components of the device are accessible.

Testing the window in the simulator

To test the WIN_Welcome window in the simulator, in an iOS configuration:
  1. Select the iOS configuration of your project:
    • Expand "Configurations (Android application)" at the top of the "Project explorer" pane.
    • Double-click the name of the iOS configuration.
  2. Click Test window in the quick access buttons (or press F9).
  3. Close the simulator information message.
  4. The emulator opens and shows the window in the screen of the selected device (iPad or iPhone).
  5. Click "Display".
  6. Validate the system window that appears.
    Window test
  7. Click the "x" icon in the menu above the simulator box to close the window.
  8. The WINDEV Mobile editor appears again.

Testing the window directly on the device

If you have an iPhone, you can follow the steps below to test the project directly on the device.
First, make sure all the following conditions are met:
  • the iPhone/iPad and the development computer must be on the same network (Wifi, for example).
  • WMDev must be downloaded to the iPhone/iPad (https://itunes.apple.com/us/app/WMDev/id1437792304).
  • the following network ports must be open:
    • 64000 (64000 to 64005 if several WINDEV Mobiles are running simultaneously).
    • 27280
    If a firewall is used, it must be configured to allow the use of these ports.
In the quick access buttons, select "Debug on a new iPhone or iPad Debug on a new iPhone/iPad". The window for connecting to an iOS device appears. This window contains a specific QR code.
Connect to an iOS device
  1. Start WMDev on the mobile device (iPhone or iPad).
    • Click "+" and then click the button displaying a bar code.
    • Scan the bar code displayed in WINDEV Mobile in the iOS device connection window.
  2. WINDEV Mobile prompts you to select the first window of the application. In our example, select the "WIN_Welcome" window and validate ("OK" button).
    First project window
  3. The mobile application starts on the iOS device. The window we created in our project opens directly.
To sum up
In this lesson, we discovered the different test modes available in WINDEV Mobile for Android and iOS.
In the next lesson, we will see how to define the window orientation using anchors.
Completed project:
If you want to check the end result of the steps described here, you can open a completed version of the project. This project contains the window we created in this lesson. To open the completed project, go to the home page and click "Tutorial", then in "Tutorial - My first Android/iOS application", double-click "My Android/iOS project - Answers".
Previous LessonTable of contentsNext Lesson
Minimum version required
  • Version 2024
Comments
Click [Add] to post a comment

Last update: 12/05/2023

Send a report | Local help