1

I am new to android development platform. I came across a line of Code

IBluetooth bluetoothProxy = BuetoothAdapter.getDefaultAdapter().getBluetoothService(null);

in Bluetooth Socket.java class.

It will be great to know what is exactly happening behind the scenes.

1

1 Answer 1

1

A Google search for "IBlutooth android" gives a link to the source code. It is an interface written in the Android Interface Definition Language (AIDL). (I had to do another search to find out what AIDL is. Google is amazing!)

7
  • AIDL is Android Interface Definition Language. It's basically Java interface definition that is not linked into the compiled application.
    – StenSoft
    Commented Feb 17, 2016 at 19:05
  • @StenSoft Thanks. Added to my answer. Commented Feb 17, 2016 at 19:06
  • @Code-Apprentice When I open the source code of BluetoothSocket in android studio it says Cannot resolve symbol IBluetooth. Can u please tell why this happens? And how do i fix it? Commented Feb 17, 2016 at 19:42
  • 2
    @tushar AIDL can be opened just like Java. However IBluetooth is a private interface (it's marked @hide in the source code) and so is not shipped with Android SDK.
    – StenSoft
    Commented Feb 18, 2016 at 14:37
  • 1
    That link is broken for me, see here: android.googlesource.com/platform/system/bt/+/a961da5/service/…
    – Sam
    Commented Sep 13, 2021 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.