Android sdk hands-free manual activation/deactivation

mbedial

Member
Hi,
we have introduced the Android SDK in our VOIP mobile app. We have a trial to evaluate the feasibility to use this sdk. We have solved a lot of issues and it seems that everything is working excepting for the hands-free manual activation/deactivation. As far as we know, it seems that the automatic activation is working when you bring the phone near the ear, but we'd like to do it manualy with a button and even to deactivate the automatic way.
Is it possible to do it? according to our research, it's included in a private library and we can't do anything.

Thanks in advance
Mario
 

Max

Administrator
Staff member
Hello,

Could you please advise if the question is about headset control, what would be the use case?
 

mbedial

Member
Actually I meant to the speaker activation, nothing to do with the headset. Wehave prepared a screen to control it (see the attached file) but we don't know how to do, and moreover how to stop the automatic activation when you bring the phone near the ear.

Thanks again.
Mario
 

Attachments

Max

Administrator
Staff member
So you mean the loud speaker is automatically activated once you bring the phone to your ear?
And you want to suppress this behavior and enable the loud speaker upon pressing (touching) the button.
Am I correct?
 

mbedial

Member
Actually. the loud speaker is activated when you ward the phone off the ear and is deactivated if you bring the phone near the ear.
We want to suppress any activation or deactivation of the loud speaker based on the sensor. As you say, we just want that the loud speaker can be enable pressing the button.

Thanks again.
Mario
 

Max

Administrator
Staff member
Got it. We will test this on our end and we will try to add such a switch if it is possible.
 

mbedial

Member
Great,
thanks a lot.
We are searching how to do it by ourselves but I'm afraid that the library is private and we can't do it.

BR
 

Max

Administrator
Staff member
We have already implemented the switch. Waiting for feedback from our QA.
I will inform you once we have the released build with a control for proximity sensor.
 

Max

Administrator
Staff member
Hello

Checkboxes for proximity sensor and loudspeaker have been added in the last version of Phone-min.
The latest Android SDK download link: https://flashphoner.com/downloads/b...72bdd99551ae10b3f2ed82c1b6366db2f31cf4.tar.gz
Phone-min apk is available in samples folder.

1. Loudspeaker: checkbox 'speakerPhone'
When this checkbox is selected (and checkbox 'proximitySensor' is not selected), audio is always played thru loudspeaker, regardless of whether headset is inserted or not.

Android-WebRTC-Phone-Speaker-Phone-Enabled.png


2. Proximity sensor: checkbox 'proximitySensor'
When this checkbox is selected, proximity sensor is enabled:
- when the device is held to ear, audio is played thru headset if it is inserted, or thru internal speaker if headset is not inserted
- when the device is not held to ear, audio is played thru loudspeaker

Android-WebRTC-Phone-Proxiity-Sensor-Enabled.png


3. Loudspeaker + proximity sensor
When both 'proximitySensor' and 'speakerPhone' are selected, the behavior is the same as when only 'proximitySensor' is selected: audio is played thru loudspeaker when the device is not held to ear.

Android-WebRTC-phone-app-both-proximity-sensor-andspeaker-phone-enabled.png
 
Top