How to simulate a call so that the bluetooth audio get streamed into a vehicle? - iphone

The iphone connects to most vehicles via bluetooth. Phone calls as well as voice control and siri also get routed via the bluetooth audio and mic of the vehicle.
How can i stream audio in the same way?
I have sen answers about the vehicle capability to support streaming audio, but this is not what i am looking for. If siri and voice control can stream over the vehicle audio as it is treated as a voice call then i should be able to stream everything else.
Thank you

It sounds like you want to simulate a call originated from your iPhone, as opposed to some other device that pretends to be a phone and pairs with your car. You can’t, because Apple doesn’t provide APIs to do that.

I think that false.
Google did it.
They do it in Google Search. If you search using voice, it streams simulating a call.
Something similar happens with the voice notes application from Apple. You can stream music to the car as if it was a call.
Actually, my car doesn't support A2DP, only calls, and using voice notes I can play music (odd, but works).
But..., how can we implement it???

Related

accessing itunes music data

If it helps, I am using Xcode 4.3.1 and objective-c to program simple apps on an iPhone 4s running iOS 5.1.
I would like to find the documentation for a class with methods to capture the digital music signal that iTunes sends to an output device (speaker, headphones). I assume it must be accessible since it exists in the phone prior to reaching the speakers. I am not attempting a pirating move, but rather would like to route this music signal to the phone's outgoing wireless signal so that it can be heard clearly by someone on the other end of a call (ex. a method to play a favorite song, with decent sound quality, for a friend out of town). Can anyone point me in a general direction (if that direction exists) so that I can begin learning more?
Thanks,
Seth
One, I'm pretty sure there's no way to get the raw audio samples from a song in the library. You can get a list of the tracks and tell the system to play one, but that all happens outside your app. Two, apps can't access the cell phone—there's no way to send audio from your app to a phone call. Three, even if the first two did work, calls are heavily compressed and tuned to voice data. Call a friend and have them play a song through the phone, see how it sounds. Not very good, I'll bet.

How can I record currently playing audio on the iPhone?

I'd like to record what the iPhone is currently outputting. So I'm thinking about recording audio from Apps like Music (iPod), Skype, any Radio Streaming App, Phone, Instacast... I don't want to record my own audio or the mic input.
Is there an official way to do this? How do I do it? It seems like AVAudioRecorder does not allow this, can somebody confirm?
Officially you can't. The audio stream belongs to the app playing it ,and iOS.
The Sandbox paradigm means that a resource owned by your App can't be used by another App. Resource here means Audio/Video stream or file. Exceptions are when a mediator like Document interaction controller are used.
If you want to do this you'd have to start with deducing AVFoundation's private methods and find out if theres a way there. Needless to say this it wouldn't be saleable on the App store and will probably only be possible on a jailbreak.
Good Luck.
TLDR;
This is only feasible only from time to time, as it's a time expensive process.
You can record the screen while listening your songs on Spotify, Music or whatever music application.
This will generate a video on your Photos application. That video can be converted on MP3 from your computer.
Actually, this is not true. The screen recordings will not actually have the audio from Apple Music at all, as it blocks it. Discord also uses this pipe as well, so you cannot record Discord audio either this way.

iPhone Bluetooth Audio API

My car has bluetooth capabilities for connecting to my iphone for phone calls; however, it does NOT support bluetooth audio for music streaming. I know apps like viber or skype also use bluetooth for phone calls. My question is: is it possible to write an app that fakes phone calls to stream music to my car, as if someone is calling me (but is actually playing music)? Is there some other way to hack this to get bluetooth audio streaming?
No need to jailbreak your phone. Just buy the A2DPblocker app. Costs $2.99. Sound quality isn't perfect but better than the alternative. Worked for my 2010 Volkswagen so should work for any other car that supports bluetooth but not streaming music.
First poster -
There is already an app to do this - it's part of SBSettings called Bluetooth Mono that needs to be installed (so only MONO and only for JB'd phones).
Second poster -
I suspect you are correct about HSP - I've installed the app and the sound quality is terrible.
So, I've put all my music on a USB stick and leave it permanently plugged in. Far superior sound.
Mike
I don't think there's an easy way to do this. But the bigger issue is that it would sound terrible. The bluetooth connections for doing phone calls use headset profile (HSP) and are low bitrate, mono, and frequency limited to voice ranges.
Applications for streaming audio/music over bluetooth use A2DP profile, which is much higher bandwidth and stereo.
If you try to pipe music over a an HSP phone link it will sound horrible, just as it does if you are talking to someone on the phone and they have music playing in the background.

Audio Streaming API's: Wifi vs what?

I've noticed certain radio apps, that some stations required wifi and others did not. What were those other stations possibly using? Are there other methods of streaming audio on iOS?
Apparently, I was not clear in my question before.
I'm asking in terms of API's. Is there an API to interact directly with say, FM radio, on iOS? Is wifi the only way of streaming audio?
Have a look at HTTP Live Streaming:
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/Introduction/Introduction.html

Which iPhone API should I be using for streaming audio?

I'm looking to build a little toy app that is very similar to a voip application. One person would hold one iphone and talk to the other iphone. I don't want to use gamekit because it forces a p2p connection and does not work over 3g. I'm worrying about the server side of this later but just wanted to get started with the iPhone side of it. Which API to record audio in real time and which to play it back?
Look to Audio Queue Services for capture and recording. You'd need to come up with a wire protocol to transmit the audio, but the tools to capture and playback or save on either side of the connection can be built using the queue services.