[android-developers] When recording from a Bluetooth mic, the recording is silently switched to the main mic when switching apps.

2015-03-04 Thread Digipom
On a Nexus 5 running Android 5.0.1, when recording from the bluetooth mic 
with startBluetoothSco(), the recording switches to the phone mic if the 
app is switched. Please see below:

The recording is silently switched to the main input mic. 
SCO_AUDIO_STATE_DISCONNECTED is never received.

03-04 15:13:26.0261453-2016/? D/audio_hw_primary﹕ out_set_parameters: 
enter: usecase(1: low-latency-playback) kvpairs: routing=2
03-04 15:13:26.0491453-1997/? D/audio_hw_primary﹕ select_devices: 
out_snd_device(0: none) in_snd_device(32: speaker-mic)
03-04 15:13:26.0491453-1997/? D/audio_hw_primary﹕ disable_audio_route: 
reset and update mixer path: audio-record bt-sco
03-04 15:13:26.0611453-1997/? D/audio_hw_primary﹕ disable_snd_device: 
snd_device(44: bt-sco-mic)
03-04 15:13:26.0611453-1997/? D/msm8974_platform﹕ 
platform_send_audio_calibration: sending audio calibration for snd_device(32) 
acdb_id(11)
03-04 15:13:26.0611453-1997/? D/﹕ Failed to fetch the lookup information of 
the device 000B
03-04 15:13:26.0611453-1997/? E/ACDB-LOADER﹕ Error: ACDB AudProc vol 
returned = -19
03-04 15:13:26.0611453-1997/? D/audio_hw_primary﹕ enable_snd_device: 
snd_device(32: speaker-mic)
03-04 15:13:26.0651453-1997/? D/audio_hw_primary﹕ enable_audio_route: apply 
and update mixer path: audio-record


This will also happen if the screen is switched off. Wondering if anyone 
has any ideas about this and preventing it, if possible?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Is Android Wear Compass Sensor reliable?

2015-03-04 Thread Nathan
I was thinking of offering this as an alternative= to customers. 

http://www.amazon.com/Sun-DC204WB-Slip-On-Wrist-Compass/dp/B001949J1W/ref=sr_1_1?ie=UTF8qid=1425488514sr=8-1keywords=slip+on+wrist+compass

Less battery drain, and probably more reliable. ;)

I tried forcing it to use these two sensors: 
Sensor.TYPE_ACCELEROMETER
Sensor.TYPE_MAGNETIC_FIELD

Before that, it was defaulting to a RotationVectorSensor if one exists.  
I thought, at least in the phone world, that was preferable where it 
exists.  

On Sony Smartwatch 3, it does exist but apparently not preferable. I don't 
know about the other devices. 

Anybody else have secrets to contribute?

Nathan

On Tuesday, March 3, 2015 at 3:42:44 PM UTC-8, Nathan wrote:

 I implemented code that finds the compass direction.

 It uses Sensor.TYPE_ROTATION_VECTOR.

 The same code works fine (or at least, as usual) on the phone using 
 Android 4.4. 

 I've tried it out on my Sony Smartwatch 3 and it works - a small minority 
 of the time.  

 I have found that if I look at the compass needle I placed on North, 
 Sometimes it points North. 
 Sometimes it points West
 Sometimes it points East.
 Sometimes it points South
 Sometimes it points some other 
 Sometimes it moves When I rotate the watch. Sometimes it doesn't feel like 
 it. 

 Calibrating (in other words, twisting my arm around violently), did not 
 consistently help. 

 Is my experience typical? 

 Before I spend a lot of time trying to figure out if there is something 
 weird with the code, I wanted to know how many have tried and are there any 
 secrets. 
 Maybe I should drop the idea of apps using compass sensors if they are 
 just going to annoy end users who will send me hate mail. 
 I've read things on the internet that indicate the Moto360 does not have 
 the right sensors for compass rotation but it guesses anyway. 

 Besides this device, I only have experience with the Gear Live. It had 
 some funny compass directions sometimes too. The funniest part (ha ha) was 
 once in a while, the compass sensor, plus all other motion sensors, just 
 stopped working at all for a week or two. 
 Sometimes they came back, but it happened enough that I returned that 
 unit. 
  
 Nathan


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.