Scenario: My app is running in the background. An iPhone/iPad user launches the iPod app (or Pandora or another program that plays audio) on their device and starts playing music. My app detects that that music is now playing, and records or in some way does things with the current playing audio (like stream it to a server), all while still running in the background.
Is this possible? Can anyone point me in the right direction in the SDK on how to do this?
You can't do this. And that is that.
Related
If someone has experienced this issue, that would be great to hear from.
So here is a case scenario when the audio stops working:
Load app, start playing
Exit the app
The phone goes to grey mode, then sleeps
Audio stops playing
Uunlocked the phone
Bring the app back
Stream loads back
I need to know is this: can I build an app that plays music once another video with sound is opened?
For ex. I put music on my ipod inside the iphone and can close it out and it plays anytime I open another app.
However, when I open youtube or any type of site like that and hit a video, the music on my iphone cuts off.
I want an app that allows the music to keep playng.
The design and all other parts of app are going to be simple.
Please advise if this is possible?
Thanks-
This is probably not possible to the extent you would hope for. There is a 10 minute limit for how long you can run your app in the background. So you could go into the app, have your app play music, and when you go to youtube or whatever and it would keep playing for up to 10 minutes. But that's probably not what you're hoping for, so the quick answer is no, you can't.
As soon as I open app it kills my music player. I dont want user to feel such experience. Sometime user don't want to stop their music player while app browsing. For that purpose I will provide explicitly a button in my app which stop music player.
So what function I need to call and where in my App which doesn't stop music player as soon as I launch app without single second delay or any interruption ?
You need to play with AVAudioSession. This Link may help you to achieve that.
I am having trouble playing audio inside a MPMoviePlayerViewController in the background. I can point it to mp3's just fine and listen to the audio, but when I go into the background, I don't hear audio anymore.
I set the plist entry to keep playing audio and set the audio session toAVAudioSessionCategoryPlayback. When I hit the home button, wait a few seconds, and go back to the app, the audio advanced as if it had kept playing, I just can't hear a thing when the app is in the background.
Any idea what causes this?
Thanks!
I just tested in the simulator, and it fails there. It does work fine on the device though. Must be a bug in the simulator.
Can a App record the Voice in the surroundings even when it runs in the background and play the recorded audio? Is it possible?
Multitasking doesn't allow audio recording to be in the background, so no.