
"Support for some types of background execution must be declared in advance by the app that uses them. An app declares support for a service using its Info.plist file. Add the UIBackgroundModes key to your Info.plist file and set its value to an array containing one or more of the following strings:audio—The app plays audible content to the user while in the background. (This content includes streaming audio or video content using AirPlay.)"
Is there a way to set this using Icenium?
20 Answers, 1 is accepted
Currently there is no official way for you to apply this configuration change. We are constantly expanding the iOS section of the project properties screen in Icenium and an addition for background modes sounds like a good option too. Can you please add this feature request to our feedback portal so other users can see it and vote for it?
Kind regards,Stefan Dobrev
the Telerik team
Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
We've added background modes for iOS in Icenium 1.5 and they can be set through the project properties.
What's more since v.1.6 we've given you full control by adding the ability to make configuration changes to your app by modifying the respective
Info.plist
and config.xml
for iOS and AndroidManifest.xml
and config.xml
for Android directly in the Icenium code editor. For more information, see Edit Configuration Files.Regards,
Steve
Telerik
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.

NSError *setCategoryError = nil;
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &setCategoryError];
Within the cordova build.
Do you know if and when you will be supporting this or If I can provide a the updated Obj C code to do this myself?
According to the Apple documentation, setting UIBackgroundModes key with value audio, should allow apps to play audio in background. Here are several articles from Apple's documentation describing the process:
- Audio Session Cookbook
- Activating and Deactivating Your Audio Session
- Ensuring That Audio Continues When the Screen Locks
Regards,
Steve
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

We're not aware neither have we come across such issues, but you should have in mind that you're not working directly with the native classes of iOS, rather you're using the Cordova shims, so there might be problems. You can quickly search the Cordova issue tracker for such, if it is not logged, it doesn't necessarily mean there is no problem.
If you isolate what you're trying to achieve in a simple demo we can look into, we could try to assist.
Regards,
Steve
Telerik

https://www.dropbox.com/s/576107dsujwn7bk/sample-media-player2.zip
What I am trying to achieve is the playback of the mp3 "stream". The url for the stream is in the provided demo code.
Deploying the app to an actual iOS 7 device causes the app to crash.
Unfortunately I could not test your project as http://s2.voscast.com:7762/ucy.mp3 does not open at all in our office. Can you check whether it still opens on your end? I also have suspicion that it might be our admins blocking that port as it is not a standard one, but I would have little luck convincing them to open it for me.
Still, I saw plenty of complaints that audio stream does not function in PhoneGap/Cordova. Take a look at the following articles:
- http://www.joeldare.com/wiki/play_an_mp3_audio_stream_in_phonegap
- https://github.com/devgeeks/ExampleHTML5AudioStreaming
Steve
Telerik

I am able to play mp3 files that download. It's when I send it a mp3 stream that it fails. I tried the same stream using html5 audio and the stream plays, just not in background.
Our sample app is working fine when Background mode Audio is enabled. It still plays sound in the background.
Would you provide us the stream that fails so we can test with it?
Thanks.
Regards,
Zdravko
Telerik
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET. Seats are limited.

http://vprclassical.streamguys.net/vprclassical128.mp3
http://mp3.kvcr.org/livewintro.mp3
Thank you for the details.
Unfortunately, we found there is a known issue in Cordova that prevents playing audio streams on iOS devices. You can check it here and also here.
In order to check if the HTML 5 audio will play in background, you can enable the Audio Background Mode from the project properties (as my colleague has pointed), or add the audio and fetch background modes to your apps iOS Info.plist. Here are the exact lines:
<
key
>UIBackgroundModes</
key
>
<
array
>
<
string
>audio</
string
>
<
string
>fetch</
string
>
</
array
>
I hope this helps.
Regards,
Kaloyan
Telerik
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET. Seats are limited.


From apple - : AVAudioSessionCategoryPlayback - For playing recorded music or other sounds that are central to the successful use of your app. When using this category, your app audio continues with the Silent switch set to silent or when the screen locks.
Another clue to this issue: HTML 5 audio mp3 file not playing back when iphone locked
Unfortunately, there is no way to access the AppDelegate.m file out of the box. The only possible approach at this stage is to develop a custom plugin, integrated inside your AppBuilder application that will do it for you.
However, as we understand this is not a trivial task at all, we decided to further investigate the issue and come up with a solution on our side that will allow streaming audio in the background. We will follow up on this here as soon as possible.
Until then, you can visit our Ideas and Feedback portal and add your feature requests there. I must say, I find the idea of being able to access the native files of your application rather good. Posting it there will also allow other Platform clients to vote for its implementation, which can speed up the whole process.
Thank you for the understanding. I hope this helps.
Regards,
Kaloyan
Telerik
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET. Seats are limited.

I will notify you as soon as we can provide the solution.
Thank you for your patience and understanding.
Regards,
Kaloyan
Telerik
Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

http://plugins.telerik.com/plugin/backgroundaudio

