Disable speakerphone when headphones are plugged#1097
Open
theAkito wants to merge 2 commits intoevilcorpltd:masterfrom
Open
Disable speakerphone when headphones are plugged#1097theAkito wants to merge 2 commits intoevilcorpltd:masterfrom
theAkito wants to merge 2 commits intoevilcorpltd:masterfrom
Conversation
e67dfb3 to
564ae68
Compare
564ae68 to
3214bc8
Compare
Collaborator
|
Thank you! Looks neat and I'll have a look and see if I can get it working properly. :) |
Collaborator
Author
Usually you need to add broadcast receivers to the manifest, but in this case you should not. It does not break anything, but it does not do anything and certainly does not help. When dealing with this Audio stuff, one has to do it in the code, only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.