The Haptics / Vibrate plugin enables mobile applications built with Bubble to trigger device vibration functionality. This plugin provides native access to vibration controls on both iOS and Android devices, allowing developers to create haptic feedback experiences in their mobile apps. The plugin supports both simple vibrations and complex vibration patterns with customizable durations and repetition.
Prerequisites
This plugin is designed specifically for the mobile version of the Bubble editor. To test the plugin on your mobile device, use the TestFlight app available at: https://testflight.apple.com/join/EcFCzJ32
⚠️
Please note that the testing app is currently available for iOS only.
How to setup
This plugin is ready to use immediately after installation. No additional configuration or API keys are required.
Install the Haptics / Vibrate for Bubble Mobile plugin from the Bubble plugin marketplace.
Add the Vibration element to your mobile app page.
Configure the vibration actions in your workflows.
Test the functionality on a physical mobile device.
☝
Important Notes
The plugin only functions on actual mobile devices (iOS/Android)!
Vibration will not work in preview mode or web browsers!
Always test on both iOS and Android devices as they handle vibration patterns differently!
Plugin Element Properties
The plugin contains a Vibration visual element that should be added to your mobile app page to enable vibration functionality.
Vibration
Element actions
Vibrate — Triggers a vibration with customizable pattern and duration.
⚠️
Android allows customizable vibration durations while iOS uses a fixed 400ms duration!
⚠️
Android and iOS platforms handle vibration patterns differently! Learn more in the Helpful detailssection!
Fields
☝
The Pattern field accepts text, but the value must be numeric!
Title
Description
Type
Pattern
Vibration pattern in milliseconds. Android allows customizable vibration durations (default - 400ms) while iOS uses a fixed 400ms duration. Also, comma separated values are accepted! Android interprets odd indices as pauses and even indices as vibration duration, whereas iOS treats all values as pause durations since vibration timing is fixed. Note: Use element states to check device platform!
text (optional)
Repeat
Repeat the "Pattern" until "Cancel" action is called. Works only if there are 2+ values in "Pattern"!
Checkbox
Cancel — Stops vibrating after having invoked "Vibrate" action with repetition enabled.
Element states
Name
Description
Type
is iOS
Whether indicates that device platform is iOS.
yes/no
is Android
Whether indicates that device platform is Android.
yes/no
Helpful details
Default vibration time
The default vibration time is 400ms for both platforms!
👉
Explanation
When the Vibrate action is called without any additional setup, the device will vibrate for 400 ms!
iOS platform specification
On iOS, the vibration duration is fixed at roughly 400 milliseconds.
👉
Explanation
In the above image vibration time is set to 1300 ms but the device will vibrate only for 400 ms!
On iOS, the indices in the ”Pattern” array represent the separation time (pauses between vibrations), as the vibration duration is fixed.
👉
Explanation
In the above image pattern means the following: pause for 500 ms, vibrate for 400 ms, pause for 750 ms, vibrate for 400 ms, pause for 900 ms, vibrate for 400 ms, pause for 600 ms!
Android platform specification
On Android, an arbitrary vibration duration can be specified by passing a value as a number.
👉
Explanation
In the above image vibration time is set to 1500 ms! So, the device will vibrate for 1500 ms!
On Android,odd indices in “Pattern” means pause time, even indices means vibration time!
👉
Explanation
In the above image pattern means the following: pause for 500 ms, vibrate for 750 ms, pause for 900 ms, vibrate for 600 ms!
Workflow example
Here are some basic workflow examples to help you get started with the plugin.
Vibrate with default value
As the Pattern field is optional you simply can call Vibrate action without any additional setup.
☝
The default vibration time is 400ms for both platforms!
On the page is placed a Button element to initiate vibration, a Button element to cancel vibration, an Input element to indicate vibration pattern, and a Checkbox element to enable/disable retpetition.
When the VibrateButton is clicked, the Vibrate action is called with the following setup when the Checkbox is disabled!
☝
The Pattern field accepts text, but the value must be numeric!
When the VibrateButton is clicked, the Vibrate action is called with the following setup when the Checkbox is enabled!
☝
The Pattern field accepts text, but the value must be numeric!