How I can know if the vibrator is working? or is active ( vibrating )
Asked
Active
Viewed 720 times
1
-
Do you wish to know if another app has activated it, or if your own app has successfully activated it? – André Schild Jul 27 '15 at 21:05
1 Answers
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)