Vibrate with duration and pattern

后端 未结 2 859
盖世英雄少女心
盖世英雄少女心 2020-12-06 23:12

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

2条回答
  •  情深已故
    2020-12-06 23:50

    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.

提交回复
热议问题