Device Feedback
Plugin that lets you provide haptic or acoustic feedback on Android devices.
https://github.com/VVelda/device-feedback
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation#
- Capacitor
- Cordova
- Enterprise
$ npm install cordova-plugin-velda-devicefeedback $ npm install @ionic-native/device-feedback $ ionic cap sync
$ ionic cordova plugin add cordova-plugin-velda-devicefeedback $ npm install @ionic-native/device-feedback
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
#
Supported Platforms- Android
#
Usage#
ReactLearn more about using Ionic Native components in React
#
Angularimport { DeviceFeedback } from '@ionic-native/device-feedback/ngx';
constructor(private deviceFeedback: DeviceFeedback) { }
...
this.deviceFeedback.acoustic();
this.deviceFeedback.haptic(0);
this.deviceFeedback.isFeedbackEnabled().then(feedback => { console.log(feedback); // { // acoustic: true, // haptic: true // } });