Added code for handling vibration(not sure if it actually works
though, because the emulator doesn't support vibration).