MagnetoSense is an OutSystems mobile plugin that provides access to the device's built-in magnetometer sensor, allowing mobile applications to measure magnetic field strength along the X, Y, and Z axes.
The plugin can be used to check whether a magnetometer is available on the device, retrieve the current magnetic field reading, continuously monitor magnetic field changes, and obtain the calculated magnetic field magnitude.
CheckMagnetometerAvailabilityChecks whether the device provides an accessible magnetometer sensor.
GetCurrentReadingRetrieves a single magnetic field reading containing X, Y, Z, and magnitude values.
StartWatchStarts continuous magnetometer monitoring.
GetLatestReadingRetrieves the most recent reading captured while monitoring is active.
StopWatchStops the active magnetometer monitoring process.
MagnetoSense includes a dedicated demo application that provides a visual and interactive way to explore the magnetometer capabilities. The demo displays the current magnetic field magnitude along with the individual X, Y, and Z axis values in real time.
The demo also provides clear sensor availability and monitoring status indicators, together with controls to start and stop continuous monitoring. This makes it easy to test the plugin on a physical mobile device and observe how magnetic field readings change when a magnet or other magnetic object is brought close to the device.
The demo application can also serve as a practical reference for developers who want to understand how to integrate MagnetoSense into their own OutSystems mobile applications.
The X, Y, and Z values represent the magnetic field measured along the device's three axes and are expressed in µT. The Magnitude value represents the overall magnetic field strength calculated from these three components.
MagnetoSense can be useful for applications such as magnetic field detection, digital compass functionality, detecting changes caused by nearby magnetic objects, magnetic interference monitoring, and other scenarios that require access to raw magnetometer data.
This version is intended for OutSystems 11 mobile applications using the Cordova mobile extensibility framework. Sensor availability and behavior depend on the physical capabilities of the device and its operating system.
MagnetoSense uses the cordova-plugin-magnetometer open-source Cordova plugin, originally developed by Rameez Raja and Steven de Salas and distributed under the MIT License. The dependency is maintained in a dedicated fork for use with this component.
cordova-plugin-magnetometer
Please note that a device without a magnetometer cannot provide magnetic field readings, and sensor values may vary depending on device hardware, orientation, and surrounding magnetic fields.