How to play audio file when call starts?

时间秒杀一切 提交于 2019-12-07 03:56:03

问题


I am initiating a voice call from my application. Now i want that when the user on the other side picks up the call, i want to play a recorded audio file.

How to go about this? Please help!


回答1:


I have found a workaround with this. I play an audio file on device's speakers with full sound when the phone state changes to TelephonyManager.CALL_STATE_OFFHOOK

This ensures that the user on the other side can hear the recording.




回答2:


In simple and clear words you cant stream any sound on an Incoming call



来源:https://stackoverflow.com/questions/7495506/how-to-play-audio-file-when-call-starts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!