Status Update
Comments
il...@google.com <il...@google.com>
mi...@gmail.com <mi...@gmail.com> #2
If that's not the case and I change the microphone source, it would affect the sound quality as well.
Edit: Probably on the Mac program `Audio MIDI Setup` the sound source format is changed to a lower bitrate
au...@gmail.com <au...@gmail.com> #3
I've tried the Audio MIDI Setup program, but it doesn't show any changes for my headphones that are bluetooth connected with a USB dongle.
be...@gmail.com <be...@gmail.com> #4
Hi, as the emulator continuously uses the microphone, Bluetooth headset quality will be degraded due to there being not enough bluetooth bandwidth to have both hi quality output and input. We can consider having a dynamic switch for this, but adding this will take some time.
md...@gmail.com <md...@gmail.com> #5
I don't think that is what is happening. For me, when the emulator launches, it changes the macOS input device from the internal speaker to my headphones which switches the bt profile to a2dp.
As a temporary workaround, I set hw.audioInput=no
in my avd config.ini and it seemed to help.
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #6
+1 with "not enough bluetooth bandwidth" not being the issue. Connecting the headphones after the emulator has started up has no issues.
ap...@google.com <ap...@google.com> #7
il...@google.com <il...@google.com> #8
an...@gmail.com <an...@gmail.com> #9
il...@google.com <il...@google.com> #10
an...@gmail.com <an...@gmail.com> #11
Which is almost a year old, guys!
il...@google.com <il...@google.com> #12
As a temporary workaround,
an...@gmail.com <an...@gmail.com> #13
config.ini do the fix, thanks!
source: #5 comment
- Device manager -> virtual device dropdown menu -> Show on Disk
- open config.ini and add this line: hw.audioInput=no
se...@google.com <se...@google.com> #14
config.ini changes don't seem to work for me - tried on various emulators with API level 31+. Both freshly installed emulators and existing ones.
jo...@gmail.com <jo...@gmail.com> #15
Hi. I am sorry for the issues around sound quality. I am working on a new sound card, this bug will be the next issue I will be working on.
il...@google.com <il...@google.com> #16
I was able to repro this with bluetooth headphones, it does not repro with laptop speakers somehow. It happens very early, even before the kernel is loaded.
st...@gmail.com <st...@gmail.com> #17
Bluetooth audio devices switch operating modes when used as: a) Speaker only (simplex, only supports audio out and up to stereo 48KHz sampling rate) b) Speakers + Microphone (duplex, supports both mono audio in and out at 8 or 16 Khz sampling rate)
Devices are usually by default in mode a, as soon as a sw opens the the microphone they switch to mode b and therefore any audio being reproduced suddenly jumps from 48 to 16khz and the quality gap can be clearly heard. Some drivers even have different volume settings between the 2 modes and when switching mode the volume can suddenly jump up or down.
This is why you can't repro with built in laptop speakers: their sound card is not a bluetooth device and hence doesn't have this peculiar behavior.
il...@google.com <il...@google.com> #18
Thank you for the details. To me this sounds like, bluetooth headphones have to switch to 16Khz if we want to use their microphone in the emulator. One way of fixing this is to avoid touching the microphone in the emulator unless we want to record from it. As a quick fix, it is possible to switch the audio input in MacOS to the "Internal microphone" then the running emulator does not affect audio quality.
Description
The navigation components use the value in `android:label` to set the [toolbar] title depending on where in the navigation graph the use has navigated to. This works fine except I want to have the title reflect the category of things the screen is referring to, but the specific thing that the user is about to edit.
Normally I would have piece of code like `updateTitle` below on the activity and then call it from the fragment (onResume) with:
``` kotlin
updateTitle(getString(R.string.book_title, bookNumber))
```
but this does not work unless I also remove the `android:label` attribute from the nav_graph.xml.
Component used:
'android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha01'
'android.arch.navigation:navigation-ui-ktx:1.0.0-alpha01'
Version used:
as above
Devices/Android versions reproduced on:
All
- Sample project to trigger the issue.
``` xml
// snippet from nav_graph.xml
<fragment
android:id="@+id/bookFragment"
android:name="com.example.bookFragment"
android:label="@string/book_title" >
<argument
android:name="bookId"
app:type="integer" />
</fragment>
// snippet from sttrings.xml
<string name="book_title">book %1$d</string>
```
Some snippets from the way I would otherwise do it.
``` kotlin
// actrivity, implements updateTitle( from an interface (Foo)
override fun updateTitle(title: String) {
toolbar?.title = title
}
// fragment
override fun onResume() {
super.onResume()
// foo is the activity cast to Foo
foo?.updateTitle(getString(R.string.reading_title, 1))
}
```
- A screenrecord or screenshots showing the issue (if UI related).
Actual title vs expected