-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth headset button does not answer or end Signal voice calls #7679
Comments
For headsets with only one button it is doable. For the generic case with carkits with 2 buttons this is extremely complicated because Android reserves that functionality only for the official phone app. You can do that in a number of ways: the easiest way requires the MODIFY_PHONE_STATE permission, which is unfortunately only available for system apps. It would have the added advantage that an incomming "normal" call while you're on a Signal call gets busy. I asked this question already on Stackoverflow once when it came up for my job but got no answers: https://stackoverflow.com/questions/47354818/how-to-make-a-voip-app-use-a-carkit-like-the-native-call-app The only alternative that does not require root would be to implement the bluetooth communication on a low level yourself with BT sockets, but that is a lot of work, might not work correctly with all hardwareand require a lot of maintenance. |
Thanks for the insight about answering calls with the Bluetooth button. But what about ending a call in progress? I understand that it might be technically challenging to pick up calls, but that doesn't fully explain why pressing the button during a call does not end the call. |
Hangup is easy: you can detect the button being pressed, and when your call state is calling (the app knows when it is calling) it can hangup. |
I have also recently been bitten by this. A full integration would be awesome, of course, but just having hangup work would fix a lot of the annoyance; finding out that your call is still active minutes after you thought you hung up is a bit annoying :) |
Hi @johanw666, you said the easiest way requires MODIFY_PHONE_STATE, I'm developing an app in which I have system permissions. So, what would be this easiest way? Thanks in advance |
I didn't work it out completely because the app I was working on didn't have this permission but the first set of results when I Google on |
I agree, I'm not sure there is an easy solution for this issue by using the existing Java APIs. If you really must get the "Call" or "Disconnect" button events the solution might be to write a low level C code to parse the Bluetooth data stream, but this is most likely not an easy task to do. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This is only one of the issues related to Signal not using Android's proper call API, but handling calls as a media player instead. Related feature request: https://community.signalusers.org/t/implement-android-telecom-api-for-calls/41280 |
Try on 5.33 where we've integrated with the Android telecom system, and made some changes to how we ring. Please post an updated debuglog if you try with that version and still encounter problems. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sorry for the delay in getting back to you. Here are two new debug logs.
First log:
Second log:
After few more tries, this seems to be the behaviour:
Edit: However, the Telecom changes are possibly not enabled yet. https://whispersystems.discoursehosting.net/t/beta-feedback-for-the-upcoming-android-5-37-release/44124/20 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Phone: Google Pixel 6 Wanted to write in to note that up until 5.44, I was having the exact same issue. The Telecom integration patched into 5.44 appears to have resolved this issue, at least for me. I can confirm that now, the multifunction button on all devices tested will properly pick up on an incoming call and hang up when on a call. This may not related to this particular issue, but I have also noticed that when you have different Bluetooth devices active (say a smartwatch and your Bluetooth headset), Signal will switch (even in the middle of a call) to the last Bluetooth device the phone communicated with. There is no way for you to specify which Bluetooth device you want, so you're stuck with whatever Signal decides is the correct Bluetooth device. As a workaround, you can remove the ability to do calls and media from all devices that are not Bluetooth headsets, but that is obviously undesireable for multiple reasons. As a final note, as a user I wanted to thank you for this fix. There's no way to accept calls or make Signal calls using Android Auto (no notification will display, even though the ringtone plays, and Android Auto brings up the Android phone dialer history UI), so having the ability to tap the MFB on my Bluetooth headset and have that answer calls has been wonderful from a car safety standpoint. Prior to this, if I wanted to answer a Signal call while in my car, I would have to dig the phone out and answer from there (which I did not do as that is dangerous). |
We still can't answer/end incoming calls on bluetooth headset, including car dashboards. This seems to be a safety issue. Looking at the code, it seems the allow list for telecom integration is empty. Can you provide an update please. |
We tried almost a half dozen times to get telecom integration working, but it's improperly implemented across multiple vendors and devices. It results in all kinds of really bad problems. At this time, there is no plan to return to it until we hear from Google that something has improved, which potentially could be their new telecom integration library but so far that has not been the case. |
Thanks for the update. Hoping for resolution with: https://android-developers.googleblog.com/2023/11/alpha-release-of-telecom-library.html |
Would the mentioned telecom library update apply to older Androids too? |
Can this please be addressed? This is a pretty big limitation since often a headset is all I have and my phone has to be secured away. In this scenario I can't receive any signal calls. |
Bug description
Signal supports using Bluetooth headsets for voice calls. However, when an incoming Signal call rings and a bluetooth headset is paired and connected, pressing the multifunction button on the headset does not answer the Signal call. The call has to be answered manually from the phone screen, only then does the bluetooth set engage.
Even more surprisingly, pressing the multifunction button while a Signal call is in progress (and the BT set in use) has the effect of handing the call over to the regular earpiece - rather than the expected result of ending the call.
The same issue has been observed on Pixel 2 (stock 8.1) and on Nexus 5 (LineageOS 14.1).
Steps to reproduce
Actual result: The call keeps ringing.
Expected result: The call is answered, similarly to regular phone call.
Actual result: The call gets handed over to the earpiece.
Expected result: The call is ended.
Screenshots
Not relevant
Device info
Bluetooth headset: Aukey EP-B40 Bluetooth 4.1
Device: Google Pixel 2
Android version: Stock Android 8.1.0 - OPM2.171019.029
Signal version: 4.18.3
Link to debug log
Trying to pick up a Signal call by pressing the bluetooth button (nothing happens)
https://debuglogs.org/e98e666571435c9a13e6cac176ecdd4eda57ddd60a7127381c0c73625df697e0
Trying to end a Signal call by pressing the bluetooth button (call gets handed over to earpiece)
https://debuglogs.org/789eec7e8c8e1138cf86a1fe61ea803bcc1df35bbb80b4f21edc057eeb581b0a
The text was updated successfully, but these errors were encountered: