I am currently using openAL for audio playback in my app and having problems with the audio responding to the mute switch and audio volume controls in iOS 5.
I have set up an audio session category for ambient sound and it operates correctly pre-iOS 5.
Has anyone had any similar problems?
If you watch what happens when you click that button, you can see that it initially makes a request to a redirect script on www.angrybirds.com:
http://www.angrybirds.com/redirect.php?device=iphone&product=angrybirds&type=purchasegift
From there you are redirected to a secure url of the form:
https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/giftSongsWizard?gift=1&salableAdamId=343200656&productType=C&pricingParameter=STDQ
343200656 is the AppleID for Angry Birds.
Further you can reffer below link:
"Gift App" from inside the app
Related
I've been attempting to make this work for quite a while now:
My app has the potential to play videos of Youtube from within UIWebView. The user could want to use AirPlay for this. When AirPlay is on, the device could go to sleep and normally video stops playing moments after that happens. As advised in other posts, I set the AVAudioSession category to the Playback one and it works - AirPlay continues even when the device display goes to sleep.
However, this has a side-effect; if the user has activated the app while music playback is on in the background, setting the app's audio session category to Playback causes the playing music to stop and this is definitely annoying.
Ideally, I want to set the AVAudioSession category when playback of Video starts, not when my App is activated - but I've not seen any central or UIWebview notification / delegate method to determine this.
I've got a hackish workaround for iPhone where the UIWebview hosted video player always loads full screen modal and thus can be determined. But my app is Universal and on iPad the video starts inline; I can't figure out a way to know when Video playback is going to happen. This is exactly the point when the audio category should be switched to Playback - it will actually help users who want background music playing only until video starts up.
I don't want to fool around with adding Javascript events on to Video tags inside the UIWebView - that seems too fragile to me.
Is it possible to observe any AVFoundation notifications that trigger for the UIWebView video playback? Or anyone know of any other way to determine if video playback will start / has started?
I am working on a custom iPhone alarm clock.
Some users have slept in when the device is on silent and locked.
I know that the top iPhone alarms ('Smart Alarm Clock Free', 'Living Earth', 'Rise') can manually control and increase the volume if the App is in the foreground before the user locks their device.
Does anyone know how it is possible to navigate around silent mode?
When configuring your audio session simply use the AVAudioSessionCategoryPlayback category. From the docs:
AVAudioSessionCategoryPlayback or the equivalent kAudioSessionCategory_MediaPlayback—Use this category for an application whose audio playback is of primary importance. Your audio plays even with the screen locked and with the Ring/Silent switch set to silent.
Details about the different audio session categories and how to set them can be found here.
it isn't possible. The hardware switch that turns ios to silent mode cant be overriden by ios apps
(as always jailbreak'd iPhones are excluded :D)
When playing a movie through a UIWebView, and then outputting to AppleTV via Airplay, turning off iPhone screen stops playback. Why?
Anyone know how to solve this so AirPlay continues when the screen is off with my app?
Doing these two things solved it for me:
Airplay of audio using AVPlayer does not work in the background (Put the key "audio" as the key in the XML of the property list)
UIWebView: HTML5 audio pauses in iOS 6 when app enters background
Looks like it works for video too!
I'm building an App that plays a mp3 file (hosted on http://<somewhere>/<audio>.mp3) while the user is watching some changing labels (think about a lyrics app, which write the lyrics synchronised with the song).
In the bottom side of the screen I'd like to show the audio controls (play/pause, ff, rew), and a bar for indicating the downloaded part of the file and the playing point.
How is the easiest way to do it? I've already tried with AVAudioPlayer, AVplayer and MPMoviePlayerController, but none of them solved my problem.
You can use MPVolumeView Class.Read the documentation here http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPVolumeView_Class/Reference/Reference.html
i am developing an application which requires recording a video in the background while the user is listening to music player in the application?? is it possible to run video recorder of iphone in the background mode automatically without prompting the user to press the record button??
No, that is not possible. Apple provides very few APIs for background services only, such as location services and audio playback. Recording video is not amongst the approved tasks.
Have a look at the new AV Foundation framework in iOS 4.0, this framework provides (low-level) access to capturing video from the camera(s).
The main class you'll need to uses is AVCaptureSession and you'll have set the output to either to AVCaptureMovieFileOutputor AVCaptureVideoDataOutput.
More info: AV Foundation Programming Guide
I haven't been able to find a background recorder ios 4 yet, although there are a few close possibilities:
1. turn the screen black with minimum brightness which effectively shows nothing if there's enough light out
2. turn off your screen with screendimmer, it will turn back on if you touch it
3. get Camcorder which has a "secret" recording option which fakes the unlock screen while it records, when you swipe it to unlock it goes back to camera mode.
As far as I understand it's not possible to record video on background due to ios restrictions
Get the 'NO Video' app. http://itunes.apple.com/my/app/no-video/id430204140?mt=8
Download iPhone Explorer. http://www.macroplant.com/iphoneexplorer/
With the 'NO Video' app installed, connect your iPhone to your computer with the USB port, and launch iPhone Explorer.
Go to Apps/NO Video/NO Video.app/images and copy 1.jpg to your desktop.
With an image-editing software such as Photoshop, change the 1.jpg to a plain black image without changing the size and save it.
Now copy the plain black image back to the Apps/NO Video/NO Video.app/images folder and replace the 1.jpg in the folder.
Restart your iPhone.
Launch the 'NO Video' app, click the red icon at the bottom to start recording, then flick to the left to reveal a plain black image while still recording video.