-
Notifications
You must be signed in to change notification settings - Fork 672
@capacitor/motion: Add frequency option #1424
Copy link
Copy link
Closed as not planned
Labels
platform: androidplatform: iosplatform: webplugin: motiontype: feature requestA new feature, enhancement, or improvementA new feature, enhancement, or improvement
Description
Feature Request
Plugin
- @capacitor/motion
Description
Both Accelerometer, Gyroscope and OrientationSensor support a frequency option. My feature request is to support similar functionality in @capacitor/motion
Platform(s)
Web, Android, iOS
Preferred Solution
I have two options:
Motion.addListener('accel', { frequency: 50 }, (event) => {});or
Motion.setListenerFrequency('accel', 50);
Motion.addListener('accel', (event) => {});The latter would make more sense when assuming only one 'main' listener is used for the sensors as the frequency would be applied to all listeners for that event.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
platform: androidplatform: iosplatform: webplugin: motiontype: feature requestA new feature, enhancement, or improvementA new feature, enhancement, or improvement