Good day, I apologize for my poor English. I am encountering an issue with Ionic Capacitor while attempting to utilize the Vibration plugin. The documentation lacks detailed information, and when checking the Android Studio terminal, I found the following error message:
Error:
https://i.sstatic.net/UdAfk.png
This is the snippet of code I am working with:
import { Plugins, CameraResultType } from '@capacitor/core';
import { Vibration } from '@ionic-native/vibration/ngx';
const { Camera } = Plugins
interface Props extends React.Props<ControlVibratorComponent> {
}
export default class ControlVibratorComponent extends React.Component<Props>{
constructor(props: any, private vibration: Vibration) {
super(props);
}
changeNotificationState(e: any) {
if (e.detail.value > 0) {
console.log('vibrating');
this.vibration.vibrate(2000);
} else {
console.log('stop');
this.vibration.vibrate(0);
}
}
}