• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps queries regarding android app development

  • Thread starter Thread starter Android Question
  • Start date Start date
A

Android Question

Guest
well I'm working on a bluetooth project and after going through the source code of bluetooth adapter class's enable() method I was unable to mine the exact code snippet that goes forth to switch the bluetooth antenna ON and how it achieves so.Can anyone please channelise me...
 
Welcome to our AndroidForums! :)

I've moved your thread over here to our App Development area where you'll get more appropriate views and feedback.

Cheers!
 
Well this is an interesting one isn't it? I can trace the enable() method to an interface definition called IBlueToothManager.aidl

https://android.googlesource.com/pl...java/android/bluetooth/IBluetoothManager.aidl

So what's this '.aidl' suffix? I ask myself. It turns out that this is something cooked up by Google, to enable inter process communication (IPC). See here

https://developer.android.com/guide/components/aidl.html

The AIDL defines an interface which is implemented by a process, and can be called by another process (your app) to invoke the service method.
Now what implements enable() ? It's probably a system service running in the background, which controls the Bluetooth hardware. As such it will be a low level device driver type of thing, for which you don't have the code.
From a user point of view, your visibility of what this driver is doing ends at the interface definition.
 
Back
Top Bottom