The vibrate() method may have no effect if the device is in Silent Mode or Do Not Disturb (DND) mode. Make sure these modes are disabled and that vibration is enabled in the device's system settings.
vibrate()