Vibrate with duration and pattern
<p>I am working on a simple plugin. Now I am trying to add a vibrate property. But this code is not working. Where am I going wrong? My code is as follows. Can you help me please.</p>

<p><strong>Android:</strong></p>

<p>import android.os.Vibrator;</p>

<pre><code>public class Brid {

private Context context;
private static Brid instance;


public Brid()
{
    this.instance = this;
}

public static Brid instance()
{
    if(instance == null) {
        instance = new Brid();
    }
    return instance;
}

public void setContext(Context context) {
    this.context = context;
}



public void Vibrate()
{
    Vibrator v = (Vibrator) this.context.getSystemService(Context.VIBRATOR_SERVICE);
    v.vibrate(100);
}
</code></pre>

<p>}</p>

<p><strong>Unity3D:</strong></p>

<pre><code>    public static void Vibrate(AndroidJavaObject Brid, AndroidJavaObject context)
{
    if (Brid == null)
    {
        using (AndroidJavaClass activityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
        {
            context = activityClass.GetStatic&lt;AndroidJavaObject&gt;("currentActivity");
        }

        using (AndroidJavaClass pluginClass = new AndroidJavaClass("com.xxx.ultimatemobile.Brid"))
        {
            if (pluginClass != null)
            {
                Brid = pluginClass.CallStatic&lt;AndroidJavaObject&gt;("instance");
                Brid.Call&lt;AndroidJavaObject&gt;("setContext", context);
                Brid.Call&lt;AndroidJavaObject&gt;("Vibrate");
            }
        }
    }
}
</code></pre>

<p><strong>Button Event:</strong></p>

<pre><code>public void vibrate()
    {
#if UNITY_ANDROID

        Bridge.Vibrate(null, null);

#endif
    }
</code></pre>

<p>Thanks in advance...</p>