No vibration sound

Hi,

I just added vibration into my project. The code is below.

vibrate.html
<button ion-button color=“danger” round (click)=“vibrationBtn()”> Vibrate

vibrate.ts
import { Vibration } from ‘@ionic-native/vibration’;

vibrationBtn() {
this.vibration.vibrate(3000);

}

app.module.ts
import { Vibration } from ‘@ionic-native/vibration’;
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
TodoProvider,
Vibration
]

This is simple code and there is no error message.
I executed even on the android emulator, but I don’t hear any vibration sound. I don’t know what it wrongs.
I am using Ubuntu and ear phone in order to listen music.

Thank you in advance.

Vibration sound??? This plugin does not produce any sounds, it just vibrate the cellphone, think you can’t test it on emulator.

1 Like

I am sorry. When I working under the ionic view, it is working perfectly.

Thank you.

1 Like