What is the Universal Haptic Layer (UHL)?

The Universal Haptic Layer (UHL) is a JAR file and .SO file containing all the classes, interfaces, and algorithms necessary to create great haptics.  This is the fileset that you incorporate in your application.

Here is a view inside the UHL.

UHL Diagram

The UHL contains several components, including:

  • Effect Library: A haptic effect library, fine-tuned for great performance, and ready to help speed your way to deployment.  We have created a sizable library of often-used haptic effects that you may want to make use of for your application.  These are indexed and hard-coded in the UHL.  All you need to do is use the API in your code to call up “Explosion 3” or “Metallic Bounce”, and you’re done.  This is analogous to using pre-authored sound clips that you download or buy, instead of going to a sound studio to record your own sound effects.  You’ll find this really convenient if you’re in a rush. The effects in the library have been tested on a variety of handsets and will produce a consistent, high quality experience for end users.
  • Launcher: The Launcher interface is a great way to ensure your application creates great haptics on any Android device.  The Launcher will identify the characteristics of the device and render the effect based on those characteristics.  If playing on a TouchSense handset, the native TouchSense Player will be used to render the effects.  If the device does not have the TouchSense Player, the UHL will use its TS3000 Emulator to render the effect.
  • Haptic API:  The Haptic API is a close cousin to the TouchSense Player API.  The Haptic API will control the TouchSense Player, when present, or connect to and control the TS3000 emulator, when TouchSense is not present on a given device. The Haptic API provides advanced Haptic control functions that allow the playback and modulation of effects of your own design.
  • TS3000 Emulator:  With the Emulator, your application code will create haptic sensations, even if a particular Android handset does not ship with the TouchSense Player onboard.  By using the UHL, you can code haptics once, and deploy universally.  Haptic effect quality will be best on native TouchSense Player handsets, but you will find that the emulator does a reasonably good job on all other handsets (dependent on the vibration hardware used in the particular Android handset model, ‘your mileage may vary’ – but it’s plenty good, generally).


You’ll find all the documentation to get started with the UHL in the Getting Started section of the Developer Guide.