Code Monkey home page Code Monkey logo

cordova-plugin-tapticengine's Introduction

Cordova Plugin iOS Taptic Engine

(cordova-plugin-tapticengine v1.0.0)


ย 

Author

Matteo Pisani
E-mail: [email protected]
Linkedin: http://www.linkedin.com/in/matteopisani

Description

This plugin allows developer to manage Taptic Engine feedback of supported Apple devices. With a simple call to the "TapticEngine" object, vibration can be performed.

Supported Devices (Apple)

  • iPhone 6S
  • iPhone 6S Plus
  • iPad Pro

Supported OS

  • iOS >= 9.0

Starting

Create a new Cordova Project

$ cordova create TapticEngineApplication com.development.tapticengine TapticEngineApplication

Installing the plugin (from GIT)

Clone the plugin

$ git clone https://github.com/xonoxitron/cordova-plugin-tapticengine.git

Install the plugin

$ cd TapticEngineApplication
$ cordova -d plugin add ../cordova-plugin-tapticengine

Or alternatively

Installing the plugin (from NPM)

Clone the plugin

$ cd TapticEngineApplication
$ git clone cordova-plugin-tapticengine

Using

Edit ~/TapticEngineApplication/www/yourfile.js and add the following code inside or after that onDeviceReady event has been triggered

document.addEventListener('touchstart',function()
{
  TapticEngine.generateTapticFeedback(); // perform a vibration
},false);

Testing

Install iOS platform

cordova platform add ios

Run the code

cordova run ios

Or

cordova run ios --device

Test Application

  • Inside the path ~/cordova-plugin-tapticengine/test/TapticEngineApplication there's the XCode iOS test application, just open it, build it, connect your device and deploy it in.
  • When test application opens TapticEngine (object) will be created.
  • Cordova core brings to JavaScript the object in question exposing private API of UITapticEngine Class.
  • By pressing the touchscreen, if your device is supported, you should feed TapticEngine vibration performed under your finger.

cordova-plugin-tapticengine's People

Contributors

xonoxitron avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.