I would like to allow controlling the iPod on top of my application when the user double taps the home button. I know there are a few apps out there that allow this. Unfortunately my app just quits.
Do I have to set anything to allow this behavior?
Is it possible that my app prevents the iPod app from showing above it because it also plays a sound from time to time?
The double-tap-for-iPod behaviour, if people are using the defaults (most people do) only works to bring up the mini player if music is already playing.
Check out Settings > General > Home. As you can see, there are a variety of things the user can choose to happen on double-click. Below that list of things, there is the option for "iPod controls" - when playing music, show iPod controls. This is what you want, and unfortunately there is no way you can choose to override the default behaviour and show iPod controls when music isn't playing.
There are 2 other options (both for the user, not you unfortunately):
If they turn the screen off, whilst in your app, and then double-click the home button, the mini player will show on screen and then they can play music. They will then still be within your app when they turn on and unlock the screen.
If they have a 3G-S or latest iPod Touch, then holding the home button will bring up the voice command menu, from which they can play music. They will then still be in your app when that menu closes.
Probably not the answer you wanted, but that's iPhone development for you!
Related
I just made a simple game with flash professional 6.0 and adobe AIR sdk 3.4 for iPhone.
The problem is this: when I lock the iphone pressing the power button, the screen switches off as usual, but the music of the game still sounds. If I exit the game pressing the home button it exits fine. Is only when locking the phone with the app opened.
Also, I opted-out of multitasking for my app, so if I close my app with the home button and I reload it, it loads the main menu.
Anyone knows how can I solve this?
Ok, after a lot of reading, it is a very very simple solution, just with this at the start of the app:
SoundMixer.audioPlaybackMode = AudioPlaybackMode.AMBIENT;
With this playback mode, the sound mutes when the app goes to the background.
I am working on Audio related project. I am playing audio, in both case, either my app is active or suspended. I am stuck here, when I play audio and lock my iphone, when I double click on home button, there appears the player controls. I try to play/pause may audio, without unlocking the iphone same as in default ipone/ipod application. Is it possible? If yes then feel free to help. Thanks in advance.
Use Remote Control events
Remote control events are any event received for the purpose of controlling media. eg iTunes pause/play/next/previous buttons available from double-tapping the home screen button, or remote-control events from play/pause buttons on headphones.
http://www.sagorin.org/2011/11/29/ios-playing-audio-in-background-audio/
the app I'm working on supports iOS multi-task feature by default, and I want to stick with this.
Upon app launch, a splash movie clip is played (code is in AppDelegate), after user hits the home button, and re-launches the app, I want to the same splash movie be played before showing the last view where use was.
I know by switching off the multi-task support, I can achieve this, but in the meanwhile, I'm losing the multi-task support feature, and I need to write code to save/resume user states. So, is there any workaround for this? thanks!
You could try the app delegate's applicationDidBecomeActive: method but quite frankly I'd consider this to be user hostile behaviour. Who wants to see a movie every time they switch between apps? The point of multitasking on the iPhone is to quickly change between apps and this violates that.
Does iphone support multitasking for third party applications.Canone explain me how.
Assuming your device is newer than an iPhone 3G (or 1st gen iPod Touch), then yes, your application may run in the background. Note that even iOS4 doesn't allow multitasking on the older devices. What happens in iOS4 and above is that when you press the home button from an application, it switches the current app to the background - however, it is still running.
When working with games this means you have to use your application delegate to pause your game when the application is sent to the background, and (optionally) resume it when it returns, or present a "pause menu". It should also switch to a low/idle rendering loop (4FPS or similar), however, extra care has to be taken with iPad apps, which do not allow OpenGL rendering in an application that is currently in the background (in my experience). For these cases you have to completely disable the OpenGL render loop. These steps will prevent your application using unnecessary processing power while in the background.
You can see what's currently running in the background by double-tapping the home button on your device. The icons for all the apps will appear in a sliding list at the bottom of the screen. You can press and hold them to bring up the little X's allowing you to terminate the processes.
When this app (douban.fm) is running, the default volume bar could control it playing/next instead of the iPod app. and there's a play icon in the status bar. and I believe the headset control could control the app as well.
I'm developing a similar music app and wondering how to accomplish this functionality that when my app is running, users could use the control bar or headset control to play/next?
the play icon in status bar (near the battery icon)
https://picasaweb.google.com/nicoster/201134?feat=directlink#5580079059148648786
system music control now controls douban.fm
https://picasaweb.google.com/nicoster/201134?feat=directlink#5580079159380140162
see this question. I think it'll help :)
How to enable iPod controls in the background to control non-iPod music in iOS 4?