通话过程中播放的歌曲过程中、歌曲

2023-09-05 04:37:17 作者:最后一丝温柔

请帮助我如何通话过程中播放的歌曲,如果我们在同一个 通话双方应该听这首歌,和呼叫必须被断开 自动一旦玩做...

please help me how to play song during call if we are in same call both should listen that song, and call must be disconnected automatically once playing done...

present我的应用程序的表现就像,如果我打电话给任何人,一旦调用解除正在播放的歌曲,但我只听到这首歌,但我想做的事情其他人也应该听听这首歌。

present my application behaving like,if i call to anyone once call lifted song is playing but i am only hearing that song but i want to do other person also should listen that song.

但我发现在一个论坛做这样的:你可以做的最接近的事,就是把电话设置为扬声器电话,然后打在speaker.sounds的声音直接在电话的话筒,然后将进行。

but i found in one forum to do like : The closest thing you can do, is have the call set to speaker-phone and then play the voice over the speaker.sounds straight to the mic in a phone call then that would be done.

但我没有找到API。

请帮我该怎么办,如果有人知道这一点。

please help me how to do if anyone knows this.

推荐答案

这是不可能的机器人 - 你没有访问的通话音频流

This is not possible in Android -- you do not have access to the in-call audio stream.

您所描述的解决方法(免提模式)应该工作,使用普通的媒体类别(例如,的MediaPlayer )。

The workaround you describe (speakerphone mode) should work, using ordinary media classes (e.g., MediaPlayer).