MobileUI LogoMobileUI
/

🔌 Vibrator

How to realize good vibrations in your app


The Vibrator Plugin PURPLE gives you a simple interface for letting the device vibrate for about 500ms.

Plugin Infos
Dependency"io.nevernull:mobileui-plugin-vibrator"
Api Docsio.nevernull.mobileui.plugin.vibrator
Main Interfaceio.nevernull.mobileui.plugin.vibrator.Vibrator

Example Usage

Here is how to make good vibrations:

MainController.java
@Prototype
public class MainController {
    @Inject
    Vibrator vibrator;
    public void onClick() {
        vibrator.vibrate();
    }
}

Note: iPads and iPods cannot vibrate, they are missing the required hardware 😔.