Occtax-mobile

May 6, 2026 · View on GitHub

GeoNature Android mobile application for Occtax GeoNature module.

Based on datasync module to synchronize data and maps module to show maps data.

Documentation

Launcher icons

NameFlavorLauncher icon
DefaultgenericPNX PNX_debug

Settings

The app settings file is automatically updated locally when the application is started, as soon as the GeoNature URL is defined, with the one on GeoNature server. This settings file settings_occtax.json can be found locally in the Android/data/fr.geonature.occtax2/ directory of the terminal's main storage. Example:

{
  "area_observation_duration": 365,
  "sync": {
    "geonature_url": "https://demo.geonature/geonature",
    "taxhub_url": "https://demo.geonature.fr/geonature/api/taxhub",
    "gn_application_id": 3,
    "observers_list_id": 1,
    "taxa_list_id": 100,
    "code_area_type": "M1",
    "page_size": 10000
  },
  "map": {
    "show_scale": true,
    "show_compass": true,
    "max_bounds": [
      [52.0, -6.0],
      [41.0, 9.0]
    ],
    "center": [46.0, 3.0],
    "start_zoom": 10.0,
    "min_zoom": 8.0,
    "max_zoom": 19.0,
    "min_zoom_editing": 12.0,
    "base_path": "Offline_maps",
    "layers": [
      {
        "label": "IGN: plan v2",
        "source": "https://wxs.ign.fr/essentiels/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/png&LAYER=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2"
      },
      {
        "label": "IGN: ortho",
        "source": "https://wxs.ign.fr/ortho/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=ORTHOIMAGERY.ORTHOPHOTOS"
      },
      {
        "label": "OpenStreetMap",
        "source": [
          "https://a.tile.openstreetmap.org",
          "https://b.tile.openstreetmap.org",
          "https://c.tile.openstreetmap.org"
        ]
      },
      {
        "label": "OpenTopoMap",
        "source": [
          "https://a.tile.opentopomap.org",
          "https://b.tile.opentopomap.org",
          "https://c.tile.opentopomap.org"
        ]
      },
      {
        "label": "IGN plan",
        "source": "plan.mbtiles"
      },
      {
        "label": "IGN ortho",
        "source": "ortho.mbtiles"
      },
      {
        "label": "Mailles 5x5",
        "source": "mailles.geojson"
      }
    ]
  },
  "input": {
    "date": {
      "enable_end_date": true,
      "enable_hours": true
    }
  }
}

Parameters description

ParameterUIDescriptionDefault value
area_observation_durationArea observation duration period (in days)365
syncData synchronization settings (cf. https://github.com/PnX-SI/gn_mobile_core/tree/develop/datasync)
mapMaps settings (cf. https://github.com/PnX-SI/gn_mobile_maps/tree/develop/maps)
inputInput form settings
input/dateDate settings
nomenclatureNomenclature settings
nomenclature/save_default_valuesSave default nomenclature valuesfalse
nomenclature/additional_fieldsShow additional fieldstrue
nomenclature/informationInformation settings (as array)
nomenclature/countingCounting settings (as array)

Input settings

Allows to configure settings related to user input.

Date settings

How the user can set the start and end date of the input:

ParameterDescriptionDefault value
enable_end_dateWhether to edit as well the end date of the inputfalse
enable_hoursWhether to edit as well the hour part of the start and end date (if enabled)false

The combination of these parameters gives the following configuration:

  • enable_end_date and enable_hours are set to false: only the start date without the hour part is editable
  • only enable_end_date is set to true: the start and end date without the hour part are editable
  • only enable_hours is set to true: only the start date including the hour part is editable
  • enable_end_date and enable_hours are set to true: the start and end date with the hour part are editable

If nothing is configured, only the start date without the hour part is editable.

Nomenclature settings

save_default_values: Allows to save locally and only during a session of use selected nomenclature values as default values (default: false).

Allows to define if fields are displayed by default and if they are editable (visible). If a field is not editable (visible), it will use the default value set in Occtax database.

All these settings may not be defined and the default values will then be used instead:

Information settings

NomenclatureLabelDisplayed by default (default)Displayed in advanced viewEditable (visible)
STATUT_OBSobservation status
METH_OBSObservation methods
ETA_BIOBiological state
METH_DETERMINDetermination method
determinerDeterminer
STATUT_BIOBiological status
OCC_COMPORTEMENTBehaviour
NATURALITELevel of naturalness
PREUVE_EXISTProof of existence
commentComment

Counting settings

NomenclatureLabelDisplayed by default (default)Editable (visible)
STADE_VIELife stage
SEXESex
OBJ_DENBRPurpose of the enumeration
TYP_DENBRType of enumeration
count_minMin
count_maxMax
mediasMedias

Note: Any unknown nomenclature attribute added will be simply ignored at startup.

You can override these default settings by adding a property for each nomenclature settings, e.g.:

{
  "nomenclature": {
    "save_default_values": false,
    "information": [
      "METH_OBS",
      {
        "key": "ETA_BIO"
      },
      {
        "key": "METH_DETERMIN",
        "visible": true,
        "default": true
      },
      {
        "key": "STATUT_BIO",
        "visible": true,
        "default": false
      },
      {
        "key": "OCC_COMPORTEMENT",
        "visible": true,
        "default": false
      },
      {
        "key": "NATURALITE",
        "visible": true,
        "default": false
      },
      {
        "key": "PREUVE_EXIST",
        "visible": true,
        "default": false
      }
    ],
    "counting": ["STADE_VIE", "SEXE", "OBJ_DENBR", "TYP_DENBR"]
  }
}

Each property may be a simple string representing the nomenclature attribute to show or an object with the following properties:

PropertyDescriptionMandatory
keyThe nomenclature attribute
visibleIf this attribute is visible (thus directly editable) or not (default: true)
defaultIf this attribute is present by default (default: true)

Example:

  • "METH_OBS" has the same meaning like

    {
      "key": "METH_OBS"
    }
    

    or

    {
      "key": "METH_OBS",
      "visible": true
    }
    

    or

    {
      "key": "METH_OBS",
      "default": true
    }
    

    or

    {
      "key": "METH_OBS",
      "visible": true,
      "default": true
    }
    
  • An omitted property (e.g. METH_OBS) has the same meaning like

    {
      "key": "METH_OBS",
      "visible": false
    }
    

Override parameters from app settings

As this local settings file is updated automatically with the one on GeoNature server, we advise you not to update it directly by hand. To do this, you can locally overwrite the values from the GeoNature server by creating a settings_occtax.local.json file in the same location as the app settings file in the terminal's main storage. Then simply copy the parameters to be overwritten, respecting the JSON structure of the app settings file. Example, to override map layers configuration:

{
  "map": {
    "layers": [
      {
        "label": "OpenStreetMap",
        "source": [
          "https://a.tile.openstreetmap.org",
          "https://b.tile.openstreetmap.org",
          "https://c.tile.openstreetmap.org"
        ]
      },
      {
        "label": "My awesome layer",
        "source": "custom.mbtiles"
      }
    ]
  }
}

⚠ Note: When using such a configuration, which can potentially replace all the application's parameters, it's your responsibility to ensure that the final configuration is always valid and keeps pace with any changes made to GeoNature.

In case of errors, if the final configuration is incorrect, the application will automatically ignore the local settings file that allows you to replace the parameters and load the default configuration from GeoNature. Any errors reported can be found in the application logs.

Advanced search on taxa

The taxon search allows you to combine several search criteria, such as:

  • taxonomic rank (with or without group or kingdom)
  • additional data according to the area selected from the vector layer (by "color", previously observed or not)
  • simple full-text search by name or description (single word)
  • more advanced full-text search by name or description that can combine several words (implicit "AND" operator), with boolean operators like NOT, AND OR and parentheses Note: Advanced text search is only available on Android version 11 (API 30+) and higher.

Some example of search queries

  • "ibex": search all taxa matching any word containing ibex
  • "ibex sim": search all taxa matching any words containing a phrase query ibex sim
  • "ibex* sim*": search all taxa matching any words containing a phrase query with words starting by ibex* sim*
  • "^corsic*": search all taxa matching any phrase starting by corsic*
  • "ibex* NOT sim*": search all taxa matching any words containing a phrase query with words starting by ibex* but without any word starting by sim*

Upgrade git sub modules

Do NOT modify directly any git sub modules (e.g. commons, compat, mountpoint, viewpager and maps). Any changes should be made from each underlying git repository:

./upgrade_submodules.sh

Troubleshooting

  • Kotlin error, Redeclaration from class within imported module:

    clean project from menu Build -> Clean Project, then rebuild project.

Full Build

A full build can be executed with the following command:

./gradlew clean assembleDebug

Financial support

This application have been developed with the financial support of the Office Français de la Biodiversité.