You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
486 B
TypeScript
21 lines
486 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { Vibration } from '@ionic-native/vibration/ngx';
|
|
// import { SettingsService } from 'src/app/settings/service/settings.service';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class FeedbackService {
|
|
// constructor(private vibration: Vibration, private settings: SettingsService) {}
|
|
constructor(private vibration: Vibration) {}
|
|
|
|
public async vibrate() {
|
|
try {
|
|
const on = true;
|
|
if (on) {
|
|
this.vibration.vibrate(500);
|
|
}} catch (e) {
|
|
}
|
|
}
|
|
}
|