1

How I can know if the vibrator is working? or is active ( vibrating )

1 Answers1

1

To check if vibration is supported, you can use something like this

Vibrator mVibrator = (Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
boolean isVibrator = mVibrator.hasVibrator();

The hasVibrator() returns true if vibration is supported by the device.

To detect if vibration is active, it is not currently supported by Android. (source)

Community
  • 1
  • 1
Antrromet
  • 15,294
  • 10
  • 60
  • 75