androidaudiospeakerphone

Android set speakerphone on programmatically


I am trying to set speakerphone on in a call programmatically using audiomanager.setSpeakerphoneOn(true) in a service but it seems it is not working and I don't know why. Should I do something else?

Thanks


Solution

  • check if your manifest file has the permissions need to do this operation.

    I think this is the permission you need MODIFY_AUDIO_SETTINGS