npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

com.xmobitea.changx.mini-vibrate

v1.5.2

Published

Unity mobile vibration and haptic wrapper for Android, iOS, and mobile WebGL.

Readme

XmobiTea Vibrate

Unity mobile vibration and haptic wrapper for Android, iOS, and mobile WebGL.

AI Entry Points

Open the smallest file for the task:

| Need | Use | | --- | --- | | Generate common runtime code | AI_USAGE.md | | Setup, Android bootstrap, initialization order | AI_SETUP.md | | Exact signatures, enum values, compile guards, returns | AI_API_REFERENCE.md | | Platform behavior, WebGL limits, Android hazards, async behavior | AI_BEHAVIOR.md | | Agent guardrails and maintenance checklist | AGENTS.md | | Missing or conflicting docs | Runtime/Vibration.cs |

Provides

  • Static helper: XmobiTea.MiniVibrate.Vibration
  • Android vibration through Unity Android Java bridge
  • iOS preset vibration bridge: Plugins/iOS/Vibration.h, Plugins/iOS/Vibration.mm
  • iOS semantic haptics: Plugins/iOS/HapticFeedback.mm
  • Generic Vibrate() path: Handheld.Vibrate() on Android/iOS, navigator.vibrate(1) on mobile WebGL
  • WebGL vibration bridge: Plugins/WebGL/vibrate.jslib

Required Setup

Call Vibration.Init() once during early startup when Android can execute the call path.

For Android builds, make sure the final app manifest includes android.permission.VIBRATE. This package does not ship an Android manifest.

The same shared startup call is harmless on iOS and WebGL; it only performs Android handle caching under UNITY_ANDROID.

See AI_SETUP.md for the bootstrap pattern and call-order rules.

Common Calls

using XmobiTea.MiniVibrate;

Vibration.VibratePop();
Vibration.Vibrate();
_ = Vibration.VibrateNope();
Vibration.SetActive(enabled);

Decision Guide

| Need | Use | | --- | --- | | Generic tap/click feedback | Vibration.VibratePop() | | Generic OS vibration | Vibration.Vibrate() | | Slightly longer preset on Android/WebGL | Vibration.VibratePeek() | | Negative/reject feedback | Vibration.VibrateNope() | | App vibration setting | Vibration.SetActive(enabled) | | iOS semantic success/warning/error | Vibration.VibrateIOS(NotificationFeedbackStyle.Success) behind an iOS-specific path | | iOS impact style | Vibration.VibrateIOS(ImpactFeedbackStyle.Light) behind an iOS-specific path | | Android custom duration/pattern | Vibration.VibrateAndroid(...) inside #if UNITY_ANDROID |

Hard Limits

  • Android does not auto-initialize. Call Vibration.Init() before availability checks, package vibration calls, SetActive(false), or CancelAndroid() on Android.
  • Android vibration requires android.permission.VIBRATE in the final app manifest; the package does not add it by itself.
  • Android custom APIs compile only under UNITY_ANDROID.
  • Android Java bridge fields exposed by Vibration are package-owned cached handles. Do not read, assign, or use them as a setup shortcut; call Vibration.Init() instead.
  • Public Vibrate() on Android/iOS uses Unity Handheld.Vibrate(). The iOS _Vibrate() native export exists, but the current public API does not call it.
  • SetActive(false) is runtime-only package mute, not persisted settings and not an OS setting.
  • HasVibrator() on WebGL does not probe navigator.vibrate; mobile WebGL can report available while unsupported browsers silently no-op in the jslib.
  • Desktop should be treated as unsupported.

Package Metadata

  • Package: com.xmobitea.changx.mini-vibrate
  • Runtime assembly: com.xmobitea.changx.mini-vibrate.runtime
  • Namespace: XmobiTea.MiniVibrate
  • Unity: 2022.3
  • Dependencies: com.xmobitea.changx.app
  • License: Apache-2.0