android - Detect the device is vibrating? -


i have used below code vibrate device.

public void vibrator() {     try {         vibrator vibrator = (vibrator) getsystemservice(context.vibrator_service);         vibrator.vibrate(5000);     } catch (exception e) {         log.d(tag, "vibrator exception: " + e);     } } 

can programmatically detect event (check device vibrating)?

no, can't.

same question here.

you can check if device vibrating supported:

vibrator mvibrator = (vibrator) getsystemservice(context.vibrator_service); boolean hasvibrator = mvibrator.hasvibrator(); 

see more:


Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

python - Exception while importing pymorphy2 -