Android sdk hands-free manual activation/deactivation

Discussion in 'Web Call Server 5' started by mbedial, Oct 11, 2017.

  1. mbedial

    mbedial New 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
  2. Max

    Max Administrator Staff Member

    Hello,

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

    mbedial New 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

    Attached Files:

  4. Max

    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?
  5. mbedial

    mbedial New 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
  6. Max

    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.
  7. mbedial

    mbedial New 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
  8. Max

    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.
  9. Max

    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
  10. mbedial

    mbedial New Member

    Thanks a lot,
    We'll try it.
    M

Share This Page