Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Voice messages don't use ear speaker when holding phone to ear

Open sellth opened this issue 7 years ago • 61 comments

I have:

  • [x] searched open and closed issues for duplicates
  • [x] read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports

Bug description

When playing an audio message and holding the phone to the ear only the volume changes but not the speaker used. Even if the media volume is set to zero, after triggering the proximity sensor the message can be heard.

Steps to reproduce

  • receive a voice message
  • push the play button
  • hold phone to ear

Actual result: Message changes in volume and plays through the media speaker Expected result: Message is played through the earpiece speaker

Device info

Device: LGE Nexus 5X Android version: 8.1.0 Signal version: 4.16.9

Link to debug log

https://hastebin.com/kopiyenini

Possibly relevant lines from the debug log:

03-28 17:00:54.619 11906 11906 W MediaPlayer: Use of stream types is deprecated for operations other than volume control
03-28 17:00:54.620 11906 11906 W MediaPlayer: See the documentation of setAudioStreamType() for what to use instead with android.media.AudioAttributes to qualify your playback use case

Similar issues:

  • #6673
  • #6455

sellth avatar Mar 28 '18 15:03 sellth

I can confirm that it does use ear speaker when I hold up a voice messege to my ear.

DEVICE: Oneplus 2 OPERATING SYSTEM: Lineage OS 15.1 ( No microg / Gapps)

ADepic avatar Apr 07 '18 11:04 ADepic

Ok, did some further testing.

  • Couldn't reproduce the issue with an HTC U11 life running Android 8.0.0 and Signal 4.17.5
  • Can still reproduce it with my device and Signal 4.17.5
  • But only for voice messages that are longer than 5 seconds. Shorter messages switch to the ear speaker just fine. Debuglog after playing two messages, one shorter and one longer than 5 seconds: https://debuglogs.org/7980576e2c8f9ea63b3b3f15fcccacc6d03a645b44ee04d07b7e4524896d1312

sellth avatar Apr 07 '18 11:04 sellth

I can reproduce this issue with: Samsung S6, Android 7.0, Signal 4.25.9. However, it works in the "Message details" view (select the audio message and click the "i" icon ⓘ).

aleb2000 avatar Sep 07 '18 09:09 aleb2000

DEVICE: Xiaomi Mi A1 Signal 4.31.6

Same problem but only 5% of the time. 95% of the time I am able to listen to voice messages at the ear speaker. I receive 20 - 100 voice messages every day. Sometimes this error occurs and then I have to quit the app to make it work correctly again. Very annoying.

copenhagenatomics avatar Dec 23 '18 12:12 copenhagenatomics

Nexus 5X Android 8.1 LOS 15.1 Signal 4.40.4 https://debuglogs.org/8e9be6be885665a72209bf28d31a2f2612dc4a86c1b98277c0c3a67853301dab

Used to work for me, but stopped several months ago. Now, when playing audio messages the sound will come from the large speaker and when I lift the phone to my ear the sound will pause then continue to play from the large speaker. This feature was very practical. What a shame it no longer works on my phone.

ghost avatar Jun 09 '19 21:06 ghost

Signal folks, do you have any update on this one? It's a pretty annoying bug.

I have a Huawei Nexus 6P with Android 8.1.0 (Signal 4.43.8) and the same happens to me. I can also confirm it happens with the previous 3/4 Signal versions also.

x80486 avatar Jul 13 '19 14:07 x80486

So I'm able to semi-reliably reproduce this on a Nexus 5X, although it's still non-deterministic. I can confirm that we are, in fact, telling ExoPlayer to play through the earpiece, but for whatever reason it seems to sometimes ignore that. This doesn't seem to be a problem on most devices though, so I still think it's accurate to say that this a device-specific problem.

This could be a ExoPlayer bug, a device bug, or both. I can look and see if there's anything else we can do on our side, but to the best of my knowledge we're doing what we're supposed to.

greyson-signal avatar Jul 15 '19 19:07 greyson-signal

I have the same issue. When playing a voice message and holding it on my ear, it uses the speaker instead of the "ear piece speaker".

Xiaomi Redmi Note 4(x global version)

kn1g avatar Sep 09 '19 03:09 kn1g

So I'm able to semi-reliably reproduce this on a Nexus 5X, although it's still non-deterministic.

I am able to reproduce this bug every time on my 5X (For the OS information, please see the description of #9538).

Please tell me if I can help.

N.B.: I would personally expect this bug to be specific to certain builds of LOS (LineageOS). Maybe from a specific developer, from a specific builder, or using specific LOS fixes/workarounds.

7heo avatar Apr 11 '20 07:04 7heo

I can also reproduce this reliably on my Pixel 4, with stock OS (Android 10, build QQ2A.200405.005) and Signal 4.58.5, so I would not consider this a LOS-only bug.

iw0nderhow avatar Apr 18 '20 13:04 iw0nderhow

So I can easily replicate the bug. In signal play an audio message. While playing put your hand in front of the proximity sensor. The screen goes off. The audio output will change from the main speakers to the ear speaker (much much lower). We take out the hand from the proximity sensor, the screen returns to normal but the sound will keep playing on the ear speaker and not in the main speaker.

The log is here: https://debuglogs.org/ae6c6a197cc3cfd7dcf1413e60fa51b837a7d20280726f2462dc2b30cea78ae7

OnePlus 6 (8GB). Android 10. OxygenOS 10.3.3. Signal 4.59.8

diogodh avatar May 07 '20 09:05 diogodh

Same problem, Asus ZenFone 6 with Android 10, Signal 4.61.0 beta

hacktivateit avatar May 30 '20 09:05 hacktivateit

I got this problem with 4.61 before wich i had no problems. I can't reliably reproduce it and it just happent for the second time. The logs don't seem to indicate something

Device: MiA3 OS: custom lineageos (android 10) No gapps installed

Leptopoda avatar Jun 06 '20 08:06 Leptopoda

@greyson-signal @moxie0 This problem exists for more than three years. Is there any progress about it? Don't get me wrong, I love signal and appreciate work, but this is a fundamental issue.

I have a Samsung and a Motorola device, and both of them have this issue. A friend of mine has an Oppo Device and switched back to Telegram, due to this issue. This problem also occurs if you are connected to wireless headphones. If you are connected to wireless headphones and play a voice message, everything is fine and the voice message will be played on the wireless headphones. But if you accidentally trigger the proximity sensor, the voice message will automatically be played from the main speaker of the phone. This is something, which definitely shouldn't happen to a "privacy-concerned" messenger.

I think the problem is that the main speaker won't get deactivated, if the proximity sensor gets triggered. If I play a voice message, if will be played through the main speaker. But if I trigger the proximity sensor, it will be played through the ear speaker AND the main speaker.

@greyson-signal I don't think that this is an device specific problem or ExoPlayer bug. Many Signal users have this problem. Telegram also uses the ExoPlayer v2, but everything works fine there. I think the problem with the wireless headphones is in the "onSensorChanged()" Method in the "AudioSlidePlayer" class. There is no check, if a wireless headphone is connected. Only a check for wired headphones. And I'm no expert, but shouldn't the variable streamType be set at the end of the onSensorChanged() method for the media player? Like: "mediaPlayer.setAudioStreamType(streamType)"

Jowat97 avatar Aug 29 '20 17:08 Jowat97

While listening to a voice message on earpiece, I had an incoming (non-Signal) call which I did not answer. After this, the app started to exhibit the issue's behaviour. Debug log just after the occurrence.

Using Signal Beta 4.70.5 on Android 9, Huawei P20 Lite.

ProactiveServices avatar Sep 03 '20 14:09 ProactiveServices

Bug reproduced on samsung galaxy s9 plus (SM-G965F) signal 7142

eexbee avatar Oct 13 '20 06:10 eexbee

@eexbee A debug log would be helpful, preferably as soon as the problem manifests.

ProactiveServices avatar Oct 13 '20 15:10 ProactiveServices

This issue is now happening so frequently for me that I'm rebooting my handset most days just to resolve it.

ProactiveServices avatar Dec 04 '20 20:12 ProactiveServices

@ProactiveServices We pretty heavily changed voice note playback within the last month. Can you post a new debuglog?

greyson-signal avatar Dec 04 '20 23:12 greyson-signal

Using Signal beta 4.79.3. https://debuglogs.org/cb9b7d24a9997d13aca951994874f5e53a4ff6c88962a0b4f4a317176ba4ff27 Tried playing some voice notes three times, all of which when the handset was raised to my hear, the screen blanked but the speakers kept playing rather than going to earphone. Earlier this evening I had played these messages and Signal switched to earpiece each time.

ProactiveServices avatar Dec 05 '20 02:12 ProactiveServices

@ProactiveServices We pretty heavily changed voice note playback within the last month. Can you post a new debuglog?

@greyson-signal When playing voice note problem is that the screen keeps on, doesn't turn off! Huge problem it should be an urgent for quick fix. This problem happen more than 50% of the time. Samsung Note 8 android 9 https://debuglogs.org/0664bea0240482e585ab7d2c888820e091572952d2d7d178ce07e8977d685f33

adham-123 avatar Jan 19 '21 22:01 adham-123

Bug reproduced in Xiaomi Mi 10 Lite 5G Signal 77202

Pretty annoying if I'm honest :cry:

etiago avatar Jan 25 '21 20:01 etiago

Bug reproduced in OnePlus 8 pro multiple times

After booting the phone, no bug is detected. The first time you playing voice, the screen goes dark as it should. After this, the screen goes dark, when you place the phone on your ear, at random. However, the sound is transferred correctly between the loud and the ear speaker. At some point, the sound will no longer pass to the ear speaker at any point, but will be heard from the loud speaker (at least on this phone loud speaker plays from ear speaker and the bottom load speaker at the same time). However, the application recognizes that the phone is being moved to the ear as the volume level changes. After rebooting again, the situation returns to "normal" for a while.

This is very annoying...

NJrvel avatar Jan 29 '21 10:01 NJrvel

@ProactiveServices We pretty heavily changed voice note playback within the last month. Can you post a new debuglog?

@greyson-signal When playing voice note problem is that the screen keeps on, doesn't turn off! Huge problem it should be an urgent for quick fix. This problem happen more than 50% of the time. Samsung Note 8 android 9 https://debuglogs.org/0664bea0240482e585ab7d2c888820e091572952d2d7d178ce07e8977d685f33

So This problem is happening less after the last update. But yet happening. that's the new debuglog https://debuglogs.org/b91a4a0df226478bb1b88e435867117c7f26fe8eda853f300bfeadfe8eb77cde

adham-123 avatar Jan 29 '21 21:01 adham-123

Bug reproduced in OnePlus 8 pro multiple times

After booting the phone, no bug is detected. The first time you playing voice, the screen goes dark as it should. After this, the screen goes dark, when you place the phone on your ear, at random. However, the sound is transferred correctly between the loud and the ear speaker. At some point, the sound will no longer pass to the ear speaker at any point, but will be heard from the loud speaker (at least on this phone loud speaker plays from ear speaker and the bottom load speaker at the same time). However, the application recognizes that the phone is being moved to the ear as the volume level changes. After rebooting again, the situation returns to "normal" for a while.

This is very annoying...

On my Samsung A5 2017 I have the same behaviour. It is very annoying when listening to an audio message and it plays loudly on the speaker. After rebooting I have the "normal" behaviour but I don't know how much it is going to last.

nataedu avatar Feb 09 '21 09:02 nataedu

I am having this same issue on a OnePlus 6T, Android 10, Signal 5.4.7

slugger7 avatar Mar 03 '21 06:03 slugger7

On my Samsung A5 2017 I have the same behaviour. It is very annoying when listening to an audio message and it plays loudly on the speaker. After rebooting I have the "normal" behaviour but I don't know how much it is going to last.

Same issue on my Galaxy A5 2017, with Android 8.0.0 installed. Signal Version 5.5.5

twity1337 avatar Mar 25 '21 11:03 twity1337

Its crazy how this bug is not getting resolved..

itsandreramon avatar Mar 25 '21 20:03 itsandreramon

Yeah, in my opinion this is a high prio task. Instead it seems like they focus an new function like reactions on messages or a status...

@greyson-signal There is another bug. If you are listening to a voice message through the ear speaker, you can't change the volume. If you have triggered the proximity sensor and the voice message plays through the ear speaker and you try to change the volume, it will change the media-volume, but not of phone call volume. So there is no way in adjust the volume of a voice message, when it plays through the ear speaker. You must change it, that if a voice message is played through the ear speaker and the volume button gets triggered, then the phone-volume must change, not the media-volume. It work's perfectly on Telegram, WhatsApp, Viber etc. Just Signal makes a lot of problem there.

Not wanna be rude, but I think that the problems with voice messages are more important than more unnecessary gimmicks. Being able to listen to a voice message should be a fundamental thing and this problem exists for more than 4 years...

Jowat97 avatar Mar 25 '21 21:03 Jowat97

Maybe I can look into it in the future, but cannot say 100%. The code-base is Java..

itsandreramon avatar Mar 26 '21 15:03 itsandreramon