I am making an app that plays audio... with each sound piece playing I want to be able to change the "album cover" on the wallpaper of the phone... For example when you play a song on the iPod app it changes your lock screen wallpaper to an album cover photo... so how do I do this for my app, when audio is playing within my app changing the lock screen wallpaper temporarily to the album cover? Any ideas? I was thinking of playing an audio file that actually has a picture compressed into it as the wallpaper image like some iTunes songs but I know not all do that and they still get images.. hmmm Anyways I know it's possible because I own some apps that do that... Thanks if anyone can come up with anything!
In iOS5+ you can use the MPNowPlayingInfoCenter Class to achieve what you want. On version prior iOS5 this is not possible with public APIs.
More Info can be found in the documentation
Related
I wonder if it's possible to create a GUI for the iPhone home screen when an app is used?
Since I guess the answer is no (it was in the past, havn't found anything new about iOS 7): if I have an audio player, would it be possible to kind of 'route' it to the homescreen like the Podcasts app does it? I have looked for answers but only came across jailbroken solutions so far.
Is there anything one can do there? Thanks in advance.
No, the latest SDK (iOS 7.0) does not allow this, as in add custom GUI element to the lock screen. You can let the media player controls interact with your app if you are playing audio in the background.
And use the MPNowPlayingInfoCenter to display track, artist name and cover art on the lockscreen.
Apple doesn't allow any app to configure the Lock Screen in any way. You could have a music app which might display track details using the : MPNowPlayingInfoCenter.
Other than that all you can display is Notifications.
This isn't available on any version of iOS.
When I take picture from camera using UIImagePicker, background music (from ipod app, pandora app) stops. It's not happening for facebook app. Is there a separate delegate for this? Please help
This might be due to your Audio Session policy. Taking a picture makes a "click" noise. Perhaps this is causing all other sound to be stopped because of your Audio Session.
There are many question on site like
Programatically changing the iOS lock-screen ,
How to set lock screen , wallpaper and Ringtone programmatically in iPhone?
All say that apple will reject if we modify the lock-Screen image.
But I seen it in many apps.
Example Saavn is in AppStore.
In this if a song is playing and device is locked,
It shows the image of the current album on the lock screen.
Please share if anybody know how it can be done.
Thanks.
Music apps can change the lock screen wallpaper because iOS automatically displays the album artwork for the song/podcast/etc that's playing (see MPMusicPlayerController docs). As far as I know, it's not an API that's publicly available to developers.
The "podcaster" app (3rd party not apple) displays an image of the currently playing podcast. Podcast images are stored in the RSS feed and not in each mp3 so the app is dynamically telling the os which image goes with with mp3. Of course you can play "silence" out of the speaker but I don't think this is a clean solution
I have an application that allows the user to pick a photo from their device. To do this, I'm using the UIImagePickerController, but the problem is that I'm unsure whether I should be using a source type of UIImagePickerControllerSourceTypePhotoLibrary or UIImagePickerControllerSourceTypeSavedPhotosAlbum.
On my iPhone 4 running iOS 5 the saved photos album gives a much better experience, but when I try to use my iPod Touch running iOS 4.3 using a photo that I synced from iTunes, it doesn't even show up. If I switch to PhotoLibrary my iPod works but my iPhone experience is worse. When I ask the UIImagePickerController it says the SavedPhotosAlbum is available on my iPod, but I don't seem to have a way to determine that it's empty.
What is the best way to determine which source type to use? If I have a way to determine if the Saved Photo Album is empty, I guess that would work, but I don't see one.
UIImagePickerControllerSourceTypePhotoLibrary references the entire photo library, letting the user choose which album. UIImagePickerControllerSourceTypeSavedPhotosAlbum goes straight to the camera roll album without giving the user a choice as to which album to choose from. They're similar, but different. You can get to the camera roll from PhotoLibrary; you can access only the camera roll from UIImagePickerControllerSourceTypeSavedPhotosAlbum.
Reference.
I need to know is this: can I build an app that plays music once another video with sound is opened?
For ex. I put music on my ipod inside the iphone and can close it out and it plays anytime I open another app.
However, when I open youtube or any type of site like that and hit a video, the music on my iphone cuts off.
I want an app that allows the music to keep playng.
The design and all other parts of app are going to be simple.
Please advise if this is possible?
Thanks-
This is probably not possible to the extent you would hope for. There is a 10 minute limit for how long you can run your app in the background. So you could go into the app, have your app play music, and when you go to youtube or whatever and it would keep playing for up to 10 minutes. But that's probably not what you're hoping for, so the quick answer is no, you can't.