Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. startVibrating() {
  2. if (VERSION.SDK_INT < VERSION_CODES.O) {
  3. vibrator.vibrate(PATTERN, 0);
  4. } else {
  5. vibrator.vibrate(VibrationEffect.createWaveform(PATTERN, 0));
  6. }
  7. }
  8.  
  9. stopVibrating() {
  10. vibrator.cancel();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement