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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -