Each pattern mirrors a matching sound in the Audio Engine, so touch and sound feedback stay consistent across the product.
Four-pulse rising pattern — Xcojo's signature haptic, paired with the Signature sound.
Clean 2-pulse rising tap — default haptic for standard system and in-app notifications.
Single short, low-intensity pulse for minor UI feedback (matches Glass Tap sound).
Very light tick for scrolling through options, pickers, or tabs.
Two soft pulses confirming a completed action (matches Crystal Shimmer sound).
Soft double-buzz for non-urgent cautions (matches Velvet Caution sound).
Sharp triple-buzz for failed actions or validation errors.
Single strong pulse for major or destructive actions (matches Tactile Switch sound).
Gentle dual pulse for passive notifications that shouldn't interrupt (matches Velvet Pulse sound).
Build a pulse sequence: add a pulse duration, then a gap, alternating, to design a custom pattern.
Welcome to the Xcojo Haptic Engine & API. This service provides centralized haptic pattern definitions across all xcojo.com properties and native apps, kept in sync with the Audio Engine's sound presets.
pattern: Haptic preset identifier (e.g. signature, notification)signature - Xcojo Signature (Four-pulse rising pattern — Xcojo's signature haptic, paired with the Signature sound.)notification - Xcojo Notification (Clean 2-pulse rising tap — default haptic for standard system and in-app notifications.)light-tap - Light Tap (Single short, low-intensity pulse for minor UI feedback (matches Glass Tap sound).)selection - Selection Change (Very light tick for scrolling through options, pickers, or tabs.)success - Success (Two soft pulses confirming a completed action (matches Crystal Shimmer sound).)warning - Warning (Soft double-buzz for non-urgent cautions (matches Velvet Caution sound).)error - Error (Sharp triple-buzz for failed actions or validation errors.)impact-heavy - Heavy Impact (Single strong pulse for major or destructive actions (matches Tactile Switch sound).)soft-pulse - Soft Pulse (Gentle dual pulse for passive notifications that shouldn't interrupt (matches Velvet Pulse sound).)Each request returns JSON with three platform representations of the same pattern:
{
"status": "success",
"pattern": "notification",
"label": "Xcojo Notification",
"web": [25, 50, 35],
"ios": {
"type": "impact",
"style": "light",
"repeat": 2,
"note": "UIImpactFeedbackGenerator(style: .light) then .medium ~85ms later"
},
"android": {
"timings": [0, 25, 50, 35],
"amplitudes": [0, 110, 0, 190]
}
}
Supported on Android Chrome/Firefox. Not supported on iOS Safari or desktop browsers.
fetch('https://dev.xcojo.com/Haptic/?pattern=notification')
.then(r => r.json())
.then(data => {
if (navigator.vibrate) {
navigator.vibrate(data.web);
}
});
// Example for "impact" type patterns let generator = UIImpactFeedbackGenerator(style: .light) generator.prepare() generator.impactOccurred() // Example for "notification" type patterns let notifGenerator = UINotificationFeedbackGenerator() notifGenerator.notificationOccurred(.success) // Example for "selection" type patterns let selectionGenerator = UISelectionFeedbackGenerator() selectionGenerator.selectionChanged()
val timings = longArrayOf(0, 25, 50, 35) val amplitudes = intArrayOf(0, 110, 0, 190) val effect = VibrationEffect.createWaveform(timings, amplitudes, -1) vibrator.vibrate(effect)
All endpoints include automatic CORS headers (Access-Control-Allow-Origin: *) enabling cross-domain usage.