by ani » Wed, 24 Feb 2010 18:16:36 GMT

Sponsored Links
 In the current implementation given in AudioPolicyManager the BT
headset has got the highest priority and DEVICE_OUT_WIRED_HEADSET  has
got the second priority.

Priority means:When both are connected then the audio will come from
BT headset and if you remove BT headset audio will come from

I wanted to change the priority(wanted to give high priority to
DEVICE_OUT_WIRED_HEADSET instead of BT headset) but just changing
getDeviceForStrategy() function will not change the priority as we
need to take care of situation below:

a. when both are connected
b. remove the DEVICE_OUT_WIRED_HEADSET,this should transfer the audio
streams from  WIRED_HEADSET to BT headset.

Please suggest the changes required to get this done apart from the
change in getDeviceForStrategy function.



by ani » Thu, 25 Feb 2010 18:02:03 GMT

 According to Google Policy wired devices have higher priority compare
to BT devices which is not followed in AudioPolicyManager.I saw a
recent checkin by Jean-Michel in opensource but it doesn't solve the

I am talking about BT headset streaming and you connect normal wired
headset when music is streaming.That time all the stream media should
be transferred to normal wired headset.This is not done by this check-
in or am i missing something??

I would highly appreciate if you respond.



Sponsored Links


by ani » Fri, 26 Feb 2010 21:32:39 GMT

 You didn't miss anything: currently the plugging-in of a wired
accessory will not interrupt/reroute BT A2DP streaming, A2DP has
priority over wired connections. We intend to change that behavior in
a future release. Do you have a specific use-case you can share? We
can add it to our usage-scenarios to make sure this is the right
behavior to adopt.


Other Threads

1. Help: service auto restarts on breakpoint when debugging a service

I am trying to run the sample soft keyboard included in the SDK. I am
using the de{*filter*}, and the literature says that to use a breakpoint
while debugging a SERVICE, I need to include:


So here is the portion of the code I modified:

@Override public void onCreate() {
                                                             /* now let's
wait until the de{*filter*} attaches */

breakpoint 1
        mWordSeparators =
getResources().getString(R.string.word_separators);       //
breakpoint 2

I have put a couple of breakpoints, at the statements indicated by the

This is what happens: the de{*filter*} first stops at the breakpoint1, for
a few seconds. But then the service restarts. For the life of me I
can't figure out what makes the service to restart.

Any ideas?



2. CTS API Demos test case


While executing CTS  testNumberOfItemsInListView is failing.

The test case is in ApiDemosReferenceTest

Looks like the test harness is not pushing a ApiDemos.apk
ApiDemosReferenceTest.apk. files to the device, before executing the
test and recording the result.

When these apk files are manually installed (installed through adb on
to the device) these test case are passing.

Can we manually install these apk and run the test case?


3. Audiotrack buffer issues?

4. Android Developer, San Francisco, C

5. Seach suggestions with MatrixCursor no longer work in 2.2

6. Cannot get Level-List Drawable to work in ListAdapter

7. How do you handle a pound sign (#) in a string?