is it possible to play system sound through phone app? - android

Is there a way to play sound through the iPhone or android phone app. Can I play a sound so the other party can hear a song. Is there API access to the telephone stack.

Android does not allow you to modify the outgoing audio stream during a call. The best you can do is to play whatever you want to over the loudspeaker and hope the microphone picks it up.
Apple doesn't allow you to do anything except initiate calls on iOS, so it isn't possible on that either.

Related

How can I use an app (programming with Android Studio) to control the sound outputs of a device?

I would like to develop an app with which you can control the focus of individual sound outputs, so that you can, for example, play music with Spotify and at the same time play a video via Youtube, which then no longer has any sound. Is something like that even possible?
Thanks for an answer

ANDROID: Play an audio after recieving call

I am making an android application in which I have to answer the call and then I want to play pre-recorded audio so that the person calling will hear this.
Is there any API or any library which can I use for this?
Can we do it through text-to-speech ?
Thank you
It is not possible to play audio during call in Android device.
Note: You can play back the audio data only to the standard output
device. Currently, that is the mobile device speaker or a Bluetooth
headset. You cannot play sound files in the conversation audio during
a call.
Link to android documentation
https://developer.android.com/guide/topics/media/mediaplayer
For more information
How to play an audio file on a voice call in android

Google Chromecast receiver doesn't play simultaneous audio

I'm developing a Chromecast application (receiver, HTML5 and Javascript) which communicates with an Android app, all is fine, but I have a problem trying to play two "sounds" at a time in the receiver.
It's a kind of game where I need to play a song at the beggining and play some sound effects during it.
Is this possible? And if it is anyone could help me to do it? I have tried it and it works nice in the browser but in the Chromecast only one of the "sound" is played, the song or the effect, never both.
Thank you very much
You cannot have more than one active Media Element in your DOM in chromecast. For what you want to do, however, you can use Web Audio APIs and accomplish the same for short audio files.

Android: Playing audio file though telephone line

I have been searching the internet for an answer, on how to play an audio file through the telephone line (See example if you wonder what I mean). Now I have come to this site to find the answer:
Is it possible to play an audio file located on your telephone, so that the caller can hear it, without turning on your speaker and let it blast it out loud? If so, does anybody know a site to look it up at?
Example:
Peter calls Annie. Annie answers the call, and decides to play her favorite music to Peter, but she doesn't want to turn on her speaker, because her parents are sleeping in the room next to her.
I know that a telecommunications server is able to play music when people are on hold, waiting for an employee or in a queue, but is an Android phone able to do the same?
You can't do this.
All audio calls are routed through the baseband chip at a hardware level. The underlying telephony technology isn't exposed to the OS, much less the Android APIs.
So basically, this is impossible, unless you're willing to settle for playing it over the loudspeaker and hoping it gets picked up clearly.

Android: Manipulating voice in phone calls

I'm currently searching for options on how to manipulate audio on android. The goal is to process audio from the microphone in real time during a phone call. The best solution would be to do this on a native call. But rebuilding a telephone app (no VOIP) would be fine too. Are there any ways to achieve this with Android APIs (also undocumented)?
If not, which steps would be necessary to get things running?
On iOS there are some apps which manipulate voice but create a VOIP connection. I heard that on Android you can "clone" the telephone app and eventually feed it with your own audio stream? Aren't there apps which add noises during a call? What kind of APIs are involved?
The best solution would be to do this on a native call.
This is not possible. You have no access to the in-call audio stream, except perhaps in speakerphone mode.
But rebuilding a telephone app (no VOIP) would be fine too.
The last official word from Google (2010), the entire OS has no access to the in-call audio stream, as it is all handled at a lower level. Even if newer versions of Android do have access to the in-call audio stream, "rebuilding a telephone app" is only possible if you are creating custom firmware.
As a drawback i could imagine to record the Downlink Stream using the MediaRecorder API and write it back to hardware using AudioTracks write() method. By this i could manipulate incoming voice. But still I think this wont work during phone calls. And I do not see a way to choose different hardware destinations.

Categories

Resources