ansiart
ansiart

Reputation: 2591

Adobe AIR for mobile: Using Bluetooth audio as "Microphone"

I'm developing an AIR for Android application, and am current sending audio to fms servers via standard NetStream/Microphone options. I (ignorantly) assumed that attaching a bluetooth device would be pretty simple, and connecting it would make it show up as a native "Microphone". Unfortunately, it does not.

I don't think it is even possible to use Netstream.publish and publish raw bytes, so the only hope is that there's a way to use NativeProcess + Java to create a native microphone "handle" that AIR can pick up on.

Has anyone run into this issue?

Upvotes: 0

Views: 578

Answers (1)

Kadir San
Kadir San

Reputation: 78

I think one possible solution would be using NetConnection.send() instead of Netstream.publish().

  1. You should get sound data from your BT microphone. I am not sure if you can get using AIR. You may need to use an android service that gets the sound data and feeds your AIR app via a file, a UDP port or an invoke etc.
  2. When you get some sound data, encode it so flash can play it (Speex, Nellymoiser, etc) You can do the encoding in your Android service as well.
  3. Whenever your AIR app receives a sound data, send it to your streaming server via NetConnection.Send().
  4. Extend your streaming server to process sound data received. You can embed it into a flv stream, or send to other flash clients if it is a chat app.

Other than that, I can't find a way to have a "microphone handle" for your BT microphone. I once thought of creating a virtual device on Android, but I couldn't find any solution.

Upvotes: 1

Related Questions