Summary

Applications can access the ambient light sensor by using the DBusProxy class from the Gio module to talk to a D-Bus service. The API provided by the service can also be used to access other sensors.

When distributed as a flatpak, the manifest needs to include the --system-talk-name=net.hadess.SensorProxy permission that allows the application to access the net.hadess.SensorProxy service on the system D-Bus.