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 plea
My solution as follows.
Unity:
using (AndroidJavaClass pluginClass = new AndroidJavaClass("com.xx.ultimatemobile.Brid"))
{
if (pluginClass != null)
{
Brid = pluginClass.CallStatic("instance");
Brid.Call("setContext", context);
context.Call("runOnUiThread", new AndroidJavaRunnable(() =>
{
Brid.Call("Vibrate");
}));
}
}
Also, I found Manifest.xml file example before 1 minute. Now the plugin is working.