How Phone Vibration Hardware Works
Phones use small motors to produce haptic feedback. Two technologies dominate: eccentric rotating mass (ERM) and linear resonant actuator (LRA). ERM motors spin an off-center weight to create vibration: they're cheap but slow to start and stop, producing a 'mushy' buzz.
LRAs are tuned mechanical resonators driven by a voice coil. They respond in milliseconds, producing sharper, more precise haptics. iPhones since the 7, Pixel 4 and later, and most flagship Androids use LRAs. Mid-range phones often retain ERMs to save cost.
Apple's Taptic Engine is a high-quality LRA combined with custom firmware that produces a wide range of textures: taps, ticks, bumps, and continuous vibrations. Android's haptic quality varies significantly by manufacturer; OnePlus, Asus ROG, and Pixel phones offer the best haptics on Android.
The Web Vibration API only exposes basic duration control: start vibrating, stop after N milliseconds. It cannot vary intensity, frequency, or texture. Native iOS and Android apps can access more advanced haptic controls (UIImpactFeedbackGenerator on iOS, HapticFeedback class on Android).
Why Doesn't iPhone Support Web Vibration?
Apple has historically restricted web access to platform-specific features for security and privacy reasons. The Vibration API is not implemented in Safari, and as a result no web browser on iOS (including Chrome and Firefox, which use Safari's WebKit engine) supports it.
This is a deliberate Apple decision, not a technical limitation. The Taptic Engine in modern iPhones is capable of advanced haptic feedback, but only native iOS apps can use it.
If you want haptic feedback on iPhone, you need a native app: not a web app. Progressive Web Apps cannot bridge this gap on iOS.
The situation may change in the future. Apple has been gradually loosening web restrictions in iOS, and the Vibration API has been on the WebKit wishlist for years. Until then, our vibration test will only work on Android browsers.
Reading and Writing Vibration Patterns
A vibration pattern is an array of milliseconds: [vibrate, pause, vibrate, pause, ...]. The first number is duration of vibration; the second is pause length before next vibration; and so on.
Examples:
[200]: vibrate for 200ms once.
[100, 100, 100]: vibrate 100ms, pause 100ms, vibrate 100ms.
[1000, 500, 1000]: long-pause-long pattern.
Maximum useful vibration duration is typically 1000ms (1 second). Longer continuous vibrations drain battery and are harsh to feel.
For distinctive notification patterns: vary both the on and off times. Short-short-long is easier to recognize than three equal pulses. Match the rhythm of a familiar phrase ('SOS' is short-short-short-long-long-long-short-short-short, mapped to milliseconds).
Vibration Motor Diagnostics
If our test produces no vibration on Android, run through this checklist:
1. Verify the browser. Chrome and Firefox support the Vibration API on Android. Samsung Internet sometimes silently ignores vibrate() calls.
2. Check OS settings. Settings โ Sound โ Vibration โ ensure vibration is enabled. Some 'battery saver' modes disable vibration to conserve power.
3. Disable Do Not Disturb. DND blocks all notifications and may also block web-initiated vibration on some devices.
4. Test in a different app. If your phone doesn't vibrate for incoming calls or SMS either, the motor itself may have failed.
5. Reboot. Vibration drivers occasionally hang and recover with a restart.
If vibration works in other apps but not in browsers, it's a browser-specific issue: try a different browser or update the current one.
Creating Custom Notification Patterns
Distinctive vibration patterns help you identify notifications without looking at the screen. A common practice: long-short-long for VIP contacts, three short pulses for messages, single short pulse for low-priority notifications.
For accessibility, custom patterns are valuable for users with visual impairments. A learned vibration vocabulary lets you triage notifications by touch alone.
Keep custom patterns short: 1-2 seconds total. Long patterns become annoying quickly. Most users prefer brief, distinctive bursts over elaborate sequences.