Bluetooth for android in unity3d

Hi, i can get by googling that direct implementation of bluetooth for android is not possible rite now in unity and also somehow i have to use bluetooth package to get this done. But my problem is where to start with if i am creating a plugin for unity.

i am good with both C# and js, so both are fine, if u guys direct me to some tutorial or sample tht does that even tht is fine …

Thanks in advance. :sunglasses:

you need to write the java code in eclipse and get that working. Then save it as a jar file that you can call from in unity.

i get it, Thanks :slight_smile:

but how do i call it in unity!! using dllImport() ?!

use AnrodJavaObject. Sample:

static AndroidJavaClass cls_Utils=new AndroidJavaClass("com.sample.Utils");

public static string getCurrentLanguage()
{
   return cls_Utils.CallStatic<string>("getCurrentLanguage");
}

For export your plugin use Eclipse export to jar-file. And put your jar-plugin to Assets/Plugins/Android.