0

Is it possible to detect vibration in android device via code. I'm building an app using accelerometer, so want to give different condtions when the device is vibrating.

Thanks in advance :)

sreejith.virgo
  • 333
  • 1
  • 4
  • 15

1 Answers1

1

I looked into the documenation and as far as I can see this is not possible. There is no listener for vibration... See this question: Vibration listener in Android

Also, the vibration of the phone may be too weak to detect it via Shake Listener

Community
  • 1
  • 1
Manuel Allenspach
  • 12,467
  • 14
  • 54
  • 76