Disable speakerphone when headphones are plugged #1097
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the very reduced result of my efforts to get this working.
I was sure, you didn't want dead code spread all over the place, so I reduced it to a minimum, only keeping
HeadsetPlugReceiver
, since it's, by the book, fully functioning and correct, yet it yielded no expected results.If you still want to remove it, it would be nice to first save it somewhere via Git, so this ready piece of equipment can be used at a later point in time, without having to research from scratch.
The way this is problem is solved now is that the speakerphone is disabled, when a headset or headphones are already physically plugged into the device, when a call is started.
I have found no way of continuously receiving a message regarding, whether such a device is plugged in or out. All the possibilities seem to be a one-off check, without possibility of receiving it continuously.
That said, I'm done with this issue, because there doesn't seem to be a good way of completely or at least sufficiently controlling the headphones plugging process.
If you want to try your luck, knock yourself out, though I would suggest not to invest too many resources into this. It's not worth it.
Resolves #886.