This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@danyalwe/capacitor-sensors) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
The following example demonstrates how to use the Sensors plugin to access the device's accelerometer:
import{ Sensors }from'@danyalwe/capacitor-sensors';// Initialize the specific sensor and obtain const sensor =await Sensors.init({ type:'ACCELEROMETER'});// Start the sensor to begin receiving dataawait Sensors.start({ type:'ACCELEROMETER'});// Add a listener to receive accelerometer data
Sensors.addListener('ACCELEROMETER',(data)=>{console.log('Accelerometer data:', data);});