Qfield windows version pg_service.config not recognised for postgres / postgis server

Hi.
I have a postgres server set up and running and have set up a service to connect to it in qgis for windows.
This works well and I was looking to roll it out to qfield for windows. The reason being that we have a lot of in house users that don’t need the full functionality of qgis and just want to a simple view of data, and info tool level interrogation of layers.
following the instructions for the qfield direct connection I added the pg_service.config to the qfield folder on windows, identified in “about qfield” as C:\users\usernname\onedrive\documents\qfielddocuments\qfield
however when opening the qgs project , i still get the request for credential details, which the config file should provide.
I can’t test it on android as our system is locked to only allowing windows devices at the moment.

Am I putting the file in the wrong place? does it need to be formatted differently for qfield- note it woks fine in qgis.

Hi,

To know the location of where to set the pg_service.conf in QField:

  • Open any project.
  • Reveal the side dashboard by clicking on the hamburger icon, and open the main menu by clicking on the 3-dot button.
  • Select the ‘About QField’ menu item.
  • The application directory locations will be at the bottom, just below the ‘App directories’ path. Then simply place the pg_service.conf file within the QField directory.