开发者

How can you make you app close, but get Safari to play a radio stream

I've seen a radio app, from a local radio station that has the option to play the stream in the background. So you press 开发者_高级运维the button in the app, the app closes and then Safari opens and plays the stream through Quicktime.

How is this done? I think it is a really nice feature. Was under the impression that your app cant interact with the phone in this way. Like its 'sandboxed'.

Thanks -Code


NSString *pth = @"http://www.example.com/stream.mp3";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:pth]];

Although this is not needed anymore as iOS 4 supports multitasking for all apps. Previous iOSes only supported multitasking for Safari, iPod and Mail (and Phone? dunno).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜