Hello,
I'm using Matt Gallaghers AudioStreamer in my radio app.
It's just a stream that starts when the app launches, and stops when it quits. No play, pause, next or back controls.-
Therefore i dont need the iPod controls.
I've searched for it but i can't find a working way to implement this.
All i want is that the stream keeps playing if the user presses the home button.
__________________
MacBook Pro 15,4" 2,4GHz 4GB 250GB.
Mac Mini 2,53GHz 4GB 320GB.
iPhone 3GS Black 32GB.
I've already done that, but I can't seem to find a way to implement Matt's AudioStreamer to multitasking.
Seems to me you can add the audio task to the UIBackgroundModes property and wrap the call to start and stop in the audio in beginBackgroundTaskWithExpirationHandler and endBackgroundTask.
Ok, so I tried adding UIBackgroundModes and audio to Info.plist.
Still no luck. Doesn't work. Are there more stuff I need to implement to make it work?
__________________
MacBook Pro 15,4" 2,4GHz 4GB 250GB.
Mac Mini 2,53GHz 4GB 320GB.
iPhone 3GS Black 32GB.
Ok, so I tried adding UIBackgroundModes and audio to Info.plist.
Still no luck. Doesn't work. Are there more stuff I need to implement to make it work?
Did you even read my entire sentence much less the manual on backgrounding tasks?
Seems to me you can add the audio task to the UIBackgroundModes property and wrap the call to start and stop in the audio in beginBackgroundTaskWithExpirationHandler and endBackgroundTask.
Thats limited for playing 10 minutes on the background. The UIBackgroundModes isnt working for some reason.
It looks Audio Queue's dont support background playing for some reason... I can't find out why it doesnt work to move to the background and i do it exactly as in the WWDC session or as stated in the docs..
Hello,
I'm using Matt Gallaghers AudioStreamer in my radio app.
It's just a stream that starts when the app launches, and stops when it quits. No play, pause, next or back controls.-
Therefore i dont need the iPod controls.
I've searched for it but i can't find a working way to implement this.
All i want is that the stream keeps playing if the user presses the home button.
Looks like AudioStreamer uses Audiotoolbox not AVAudioSession therefore I do not believe it supports multitasking audio. This library supports Mac and iPhone.
UIDevice *thisDevice = [UIDevice currentDevice];
if([thisDevice respondsToSelector:@selector(isMultitaskingSupported)]
&& thisDevice.multitaskingSupported)
{
UIBackgroundTaskIdentifier backgroundTask = [application beginBackgroundTaskWithExpirationHandler:^{
/* just fail if this happens. */
NSLog(@"BackgroundTask Expiration Handler is called");
[application endBackgroundTask:backgroundTask];
}];
}
Place it in the didFinishLaunchingWithOptions.
This will work in the simulator, I don't have a iPhone 3gs or 4 so i'm unable te test it on a real device.
Hello,
I'm using Matt Gallaghers AudioStreamer in my radio app.
It's just a stream that starts when the app launches, and stops when it quits. No play, pause, next or back controls.-
Therefore i dont need the iPod controls.
I've searched for it but i can't find a working way to implement this.
All i want is that the stream keeps playing if the user presses the home button.
Hi,
am also exactly looking for same. is there any sample code for this streaming
UIDevice *thisDevice = [UIDevice currentDevice];
if([thisDevice respondsToSelector:@selector(isMultitaskingSupported)]
&& thisDevice.multitaskingSupported)
{
UIBackgroundTaskIdentifier backgroundTask = [application beginBackgroundTaskWithExpirationHandler:^{
/* just fail if this happens. */
NSLog(@"BackgroundTask Expiration Handler is called");
[application endBackgroundTask:backgroundTask];
}];
}
Place it in the didFinishLaunchingWithOptions.
This will work in the simulator, I don't have a iPhone 3gs or 4 so i'm unable te test it on a real device.
This code work only in Simulator can u please tell me code for iphon...
Thankx in Advance