Need help upgrading to Ionic Framework 4.0? Get assistance with our Enterprise Migration Services EXPLORE NOW

Taptic Engine

Improve this doc

An Ionic plugin to use Taptic Engine API on iPhone 7, 7 Plus or newer.

Repo: https://github.com/EddyVerbruggen/cordova-plugin-taptic-engine

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-taptic-engine
    $ npm install --save @ionic-native/[email protected]
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import { TapticEngine } from '@ionic-native/taptic-engine';

...

constructor(private taptic: TapticEngine) { }

...

this.taptic.selection();

this.taptic.notification();

this.taptic.impact();

Instance Members

selection()

Use selection feedback generators to indicate a change in selection.

Returns: Promise<any> Returns a promise that resolves on success and rejects on error

notification(options, options.type)

Use this to indicate success/failure/warning to the user.

Param Type Details
options Object

should be of the type { type: 'success' } (or 'warning'/'error')

options.type 'success'|'warning'|'error'

Returns: Promise<any> Returns a promise that resolves on success and rejects on error

impact(options, options.type)

Use this to indicate success/failure/warning to the user.

Param Type Details
options Object

should be of the type { style: 'light' } (or 'medium'/'heavy')

options.type 'light'|'medium'|'heavy'

Returns: Promise<any> Returns a promise that resolves on success and rejects on error

gestureSelectionStart()

Tell the taptic engine that a gesture for a selection change is starting.

Returns: Promise<any>

gestureSelectionChanged()

Tell the taptic engine that a selection changed during a gesture.

Returns: Promise<any>

gestureSelectionEnd()

Tell the taptic engine we are done with a gesture. This needs to be called lest resources are not properly recycled.

Returns: Promise<any>

API

Native

General