About getting audio streams to A2DP headphone and Headphone

by Rangan » Wed, 16 Sep 2009 00:57:26 GMT

Sponsored Links
 Dear All,

There is a function setRouting to set the audio for a specified mode.
                   public void setRouting (int mode, int routes, int

The parameters for the routes are:
      int ROUTE_BLUETOOTH This constant is deprecated. use
      int ROUTE_BLUETOOTH_A2DP Routing audio output to bluetooth
      int ROUTE_BLUETOOTH_SCO Routing audio output to bluetooth SCO
      int ROUTE_EARPIECE Routing audio output to earpiece
      int ROUTE_HEADSET Routing audio output to headset
      int ROUTE_SPEAKER Routing audio output to speaker
Using the OR of these parameters, theoritically we should be able to
get the routing to 2 routes. For eg. if we need blue tooth A2DP
headphone and Speaker, we should be able to achieve it using

Bu it does not work as expected on say HTC phones. It will just stay
with A2DP headphone which means, it is most likely a MIPS issue as
well and the Android system default is built this way. Am I right?

Any idea on what other ways we can achieve streaming to A2DP headphone
and also to have the same stream or different stream locally played
back on speakers.


Other Threads

1. How To Programmatically Customize Android Home Screen's Icons And Background Image?

Dear Android Programmers,

I have a few Android tablets, and I want to brand them by customizing
the look of the home screen in the following ways:
a. Change Home Screen's background image.
b. Get rid of all the icons. Instead have just one link at the bottom
that lists all applications.
c. Have One or Two Icons that I specify explicitly.

I am new to Android programming. I googled, browsed this forum and
came to the conclusion that the sample home application available at
http://developer.android.com/resources/samples/Home/index.html would
be my best bet. I was able to follow the steps successfully and
customize my android tablet. The home screen now looks different -
almost all the icons have now vanished, and been replaced by an "All"

However, I still do not know how to modify this code so that I can
change the home screen's background image. Also, I do not know how to
specify some applications to be still displayed on the home screen.
For instance, I would like Youtube icon to be still present. Can
someone point me in the right direction please?

Perhaps, most of my confusion arises from the fact that I just do not
understand the Sample Home application ... can someone point me to a
more detailed explanation of the code?

Thanks in advance.

With best regards,


2. drawCircle call causes an extra elipse draw in a custom Drawable object for google map overlay using google map android API


I'm trying to draw a circle on a MapView.

I created my own drawble object to be passed to an ItemizedOverlay

class MyDrawableMarker extends Drawable{

                        public void draw(Canvas canvas) {

                                Paint p = new Paint();


                        canvas.drawCircle(0, 0, 100, p);


                        public int getOpacity() {

                                return PixelFormat.TRANSPARENT ;

                        public void setAlpha(int alpha) {


                        public void setColorFilter(ColorFilter cf) {


It works find but the drawCircle call also draw a elipse, and if a try
to draw a rectangle, an extra rectangle it also draw.

Is it a 2D/3D configuration problem?


3. public key for repo init ?

4. Linux for alwaysinnovating board


6. Power management Issue in OMAP3 EVM

7. SQLite problem