title: Android Haptic On Unity
body: <p>I found a code for android haptic on unity that is not complete:</p>
  
  <pre><code>using UnityEngine;
      public class AndroidManager : MonoBehaviour
      {
      private class HapticFeedbackManager
          {
          #if UNITY_ANDROID &amp;&amp; !UNITY_EDITOR
              private int HapticFeedbackConstantsKey;
              private AndroidJavaObject UnityPlayer;
          #endif
  
              public HapticFeedbackManager(){
                  #if UNITY_ANDROID &amp;&amp; !UNITY_EDITOR
                  HapticFeedbackConstantsKey=new AndroidJavaClass("android.view.HapticFeedbackConstants").GetStatic&lt;int&gt;("VIRTUAL_KEY");
                  UnityPlayer=new AndroidJavaClass ("com.unity3d.player.UnityPlayer").GetStatic&lt;AndroidJavaObject&gt;("currentActivity").Get&lt;AndroidJavaObject&gt;("mUnityPlayer");
                  //Alternative way to get the UnityPlayer:
                  //int content=new AndroidJavaClass("android.R$id").GetStatic&lt;int&gt;("content");
                  //new AndroidJavaClass ("com.unity3d.player.UnityPlayer").GetStatic&lt;AndroidJavaObject&gt;("currentActivity").Call&lt;AndroidJavaObject&gt;("findViewById",content).Call&lt;AndroidJavaObject&gt;("getChildAt",0);
                  #endif
              }
  
              public bool Execute(){
                  #if UNITY_ANDROID &amp;&amp; !UNITY_EDITOR
                  return UnityPlayer.Call&lt;bool&gt; ("performHapticFeedback",HapticFeedbackConstantsKey);
                  #endif
                  return false;
              }
          }
  
          //Cache the Manager for performance
          private static HapticFeedbackManager mHapticFeedbackManager;
  
          public static bool HapticFeedback(){
              if (mHapticFeedbackManager == null) {
                  mHapticFeedbackManager = new HapticFeedbackManager ();
              }
              return mHapticFeedbackManager.Execute ();
          }
      }
  </code></pre>
  
  <p>i want to add styles to it like "impactLight", "impactMedium"...</p>
  
  <p>Do anybody knows that how to implement android haptic on unity?</p>