Flutter教程

Device Feedback

Contents

Plugin that lets you provide haptic or acoustic feedback on Android devices.

https://github.com/VVelda/device-feedback

联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

Ionic Device Feedback插件的安装(Installation)

ionic cordova plugin add cordova-plugin-velda-devicefeedback npm install @ionic-native/device-feedback
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/device-feedback

Ionic Device Feedback插件支持的平台(Supported Platforms)

  • Android

Ionic Device Feedback插件的用法(Usage)

import { 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
    // }
  });