till know, i was aware of the fact is, we cant play background process in iPhone, but with 4.0 + we can do it.
i have a doubt, suppose we develop and music player application, which need to be play audio continiously, while the application has been closed.
Is this possible.
For example, the inbuilt music player of iPhone does this, if u play an audio, and close the app, it will continue playing the audio, untill you fully close the music player.
SO my doubht is, can we play music in background, while application is closed.???
Suggestions are always appreciated
regards
Open your plist file as a plain text file and add background modes as audio.
<dict>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
// other codes
</dict>
All the Best.
Related
I'm using flutter_inappwebview to show a webview, that has webrtc capabilities, using both camera and video it works fine until the app is set to the background.
When the app is minimized (goes to background), I can still hear other users on the call but my microphone stops working and others cannot hear me.
This does work fine in Android but does not on iOS.
I'm using flutter_inappwebview version 5.3.2, and has the Audio background mode:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>fetch</string>
<string>remote-notification</string>
</array>
I'm creating a live audio streaming app using titanium studio (version 3.1.1). I need to enable background audio playback for iphone. Currently background audio works in android emulator but not in iphone sinulator (when I click the home button, audio fades away and stop). I created the audioplayer and set the audioSessionMode.
Ti.App.player = Ti.Media.createAudioPlayer({
url :'http://broadcast.infomaniak.net/radionova-high.mp3',
allowBackground :true
});
Titanium.Media.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK;
When I add and save the following lines to Info.plist file and run the project, the file reloads and remove these lines. How do I correctly edit this file? or is there another way to get background audio in iphone?
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
you basically add the section to your tiapp.xml.
here is a good blog post on the topic.
http://bencoding.com/2012/07/15/using-titanium-ios-specific-configurations/
I made an app which allows an audio file (http://site/file.mp3) to be played in the background.
This all works great. I only want an play icon to be visible like this statusbar
See the 'play' icon in the top right.
I've googled my brains out and can't seem to find anything that explains how to achieve this.
Anyone?
You might need this in your plist:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
Other than that - it might be a part of linking your app to the iPod controls; which is answered here: iPhone ios4 - Replacing iPod dock icon whilst playing background audio stream
I am creating a Radio application , in that I want to keep my radio running even though the application goes to the background.
i.e. streaming must be continued , right now it gets stopped.
Please help me out from this situation
thanks
Add a "Required background modes" entry to your application .plist. This is an array, add an item of "App plays audio".
if you look at the plist source, it'll be:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
This might be worth looking into:
iPhone ios4 - Replacing iPod dock icon whilst playing background audio stream
I have ported an iPhone application from iPhone 3.0 to support now in iOS 4.0. In this application, it does playing an audio file streaming. With the iPhone 3.0 app version, when playing streaming audio if i quit my app by pressing Home button, it will stop the audio too. This is expected.
In this latest my app version with iOS 4.0, if i quit my application when audio is playing by pressing Home button, i don't see playing the audio continuously in the background though i exited to home screen. Do i need to handle anything extra to play audio even after exit by pressing Home button? (or) is it still not supported in iOS 4.0 too? I use AudioToolBox to play audio files in queue based streaming.
Please advise.
Thank you.
You need to add this to your Info.plist:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
use this category if your using an audio session or avAudioPlayer
1.AVAudioSessionCategoryPlayback
or 2. kAudioSessionCategory_MediaPlayback