Genero mobile development client for Android

Set up a development environment to display app forms on an Androidâ„¢ device.

Using the GMA front-end on Android devices

To display Genero application forms on an Android device in development mode (with programs executing on a computer), the GMA front-end app must be installed on the device (or emulator).

Note: With the GMA front-end installed on the mobile device, you can perform a classic GUI connection based on FGLSERVER.

Installing the GMA front-end application

Before installing the GMA front-end, fulfill the prerequisites to build an Android app, as described in Building Android apps with Genero.

Perform the following steps, to install the GMA front-end from the archive:
  1. Get the GMA package (for example, fjs-gma-1.40.00-build201703031626-allos.zip), contact your support channel for download details.
  2. Unzip the archive, containing an APK ready to install.
  3. Plug your device via USB cable to the computer.
  4. Install the GMA front-end APK with the gmabuildtool command with the test option.

For example:

$ . ~/genero/devel/fgl/mobile/java-1.8.env 
$ . ~/genero/devel/fgl/mobile/android-sdk.env 
$ mkdir /tmp/gma
$ cd /tmp/gma
$ unzip ~/Download/fjs-gma-1.40.00-build201703031626-allos.zip 
Archive:  ~/Download/fjs-gma-1.40.00-build201703031626-allos.zip
  ...
  inflating: fjs-gma-1.40.00-build201703031626.apk
  ...
$ gmabuildtool test --test-apk ./fjs-gma-1.40.00-build201703031626.apk
...

Configure FGLSERVER and run the app

Once the GMA front-end is installed on the device, make sure that WIFI is enabled (or check that the TCP port is forwarded when using an emulator), you can start the GMA app.

The main GMA screen shows the IP address of the device and the TCP port it is listening to (0=6400).

On the development machine, define the FGLSERVER environment variable with the IP address of the device. For example, if the GMA is running on a device with IP address 10.0.11.188, and listening on port 6400:
FGLSERVER=10.0.11.188:0

Now you are ready to run your app on the server and display on the Android device.

TCP port forwarding for GMA on Android emulator

When the GMA development client is running in an Android emulator, an fglrun instance can connect to GMA by using TCP port forwarding feature of adb:

adb forward tcp:localhost_port tcp:gma_device_port
For example:
adb forward tcp:6400 tcp:6400
Then specify the localhost IP address in the FGLSERVER environment variable, with the port index 0 to get 6400+0=6400:
FGLSERVER=127.0.0.1:0
If the TCP port 6400 is already in use on your local computer, forward another localhost port to the TCP port 6400 the GMA is listening to on the emulator:
adb forward tcp:6402 tcp:6400
You can then connect to the GMA client with following setting (6400+2=6402):
FGLSERVER=127.0.0.1:2

Enabling Universal Rendering

Universal Rendering can be enabled by using the gui.rendering FGLPROFILE entry.