Skip to main content
Inspiring
December 6, 2011
Question

Can't connect to a Bluetooth earpiece

  • December 6, 2011
  • 2 replies
  • 1813 views

I've hired a developer to create an air app for me on Android. The app needs to record audio from, and send audio to, the user, ideally via a Bluetooth earpiece.  The developer tells me air doesn't support Bluetooth earpieces, which surprises me (he's gotten the app to work with a wired earpiece/mic). He's new to Android, though (I hired him for other expertise), so I just thought I'd double-check here.  Is a Bluetooth earpiece/air/Android app really that difficult?  If there's a way to do it, can someone give me some pointers to pass along?  Thanks.

This topic has been closed for replies.

2 replies

December 6, 2011

I am not sure about use case but you might able to achieve controlling BT Earpiece by writing a Native Extension and using http://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html

Innovatology
Participating Frequently
December 6, 2011

That would only enumerate BlueTooth headsets and get their status. Use AudioManager to determine where the audio is sent:

http://developer.android.com/reference/android/media/AudioManager.html

Innovatology
Participating Frequently
December 6, 2011

He is partially correct. Whether the "built-in" headset of the device is used, a wired headset or a BlueTooth headset is chosen at Android system level, not at application level. If it works with a wired headset it should also work with a BlueTooth headset if the phone is configured correctly.

AIR 3.0 has some new functions that allow you to choose between headset & speaker, and to enumerate the microphones, but they may not be available on all devices. In any case, if your app already works with a wired headset these functions would be irrelevant.