How to show playing item details in the iphone/ipad dock bar? - iphone

I make use of a AVPlayer to reproduce music tracks in the iPod Library.
I got the background management done, and now I can see my app icon showing in the dock bar when tapping twice the home button.
Media buttons also work fine with my app.
What I would like to do now is to show now playing item info in the same dock bar, as iPodMusicPlayer does.
Is it possible?

Use the MediaPlayer framework:
#include <MediaPlayer/MediaPlayer.h>
[[MPNowPlayingInfoCenter defaultCenter] setNowPlayingInfo:#{
MPMediaItemPropertyAlbumArtist:#"Album Artist",
MPMediaItemPropertyAlbumTitle:#"Album Title",
MPMediaItemPropertyTitle:#"Title",
MPMediaItemPropertyArtist:#"Artist"
}];

You cannot do that using iOS public API's. As far as iPod Music App is considered, it is a native iOS application built in by Apple and it uses Private API's for sure.

This is apple's sample code, may be this will help
http://developer.apple.com/library/ios/#samplecode/AddMusic/Introduction/Intro.html

Related

iPhone - hide assistive touch view programmatically

Does anyone know how to hide assistive touch view programmatically like Apple Music App does when playing video?
There is no SDK method to hide the assistive view.
Apple iPod App is done by Apple, so the App is probably using some private / undocumented SDK calls.
Yes there is. Go to Settings then General then Accessibility then Triple Click Home. Now choose Assistive Touch. Now whenever you want it to disappear just triple click the Home button on either the actual iPhone or using the Assustive Touch icon itself. Poof and its gone! To bring it back just triple click again.

Hiding revmob banners when playing videos and certain screens

I have implemented revmob ads in my app.
A movie player app.
The problem I have is that the banners still show when i play movies the app basiclly links to mp4 files that play in the stock iphone video player.
how do i tell xcode to hide ads when the player is active
I know i use the [RevMobAds hideBanner]; command i don't know where to put the code.
As alternative you can use the banner as a subclass of UIView:
RevMobAds *revmob = [[[RevMobAds alloc] initWithAppId:appID delagate:self]];
RevMobBannerView *bannerView = [revmob bannerView];
Then integrate this in you layout the same way you do with any UIView.
You can consult the RevMob API docs for more info.

Can you get the system answer call button in Cocoa Touch?

When you get a call on iPhone a system alert it is shown. There is a nice answer call button, can I use somehow this button on my app or i have to design it by myself?
I suppose this are system resources and could be available in the API.
It is not available for public use in the iOS SDK as of iOS 5
I don't really know how to fetch tat button from an iPhone or its simulator but why don't you customize your own button using this site http://dabuttonfactory.com/ ? It helped me sometimes when I needed buttons for my apps as well.

iphone / ipad VGA, External device Display

In my app it has lots of videos and animation to present a view. Am implemented External display by using TVOutManager sample app. Every thing works fine except video part.
inside my application videos are playing fine but in external window it not showing anything is simply shows "TV is connected, Video is playing in TV" in a small window.
So how to resolve this.. how to display inside app video to external window.
any idea or am i doing something wrong here..
thanks,
Here am answering to my own question.
robterrell's TVOutManager will not play any video to external device by simply doing [[TvOutManager sharedinstance] startTvOut] and [[TvOutManager sharedinstance]s topTVOut];
here we have add the instance of player to tvoutWindow.
[tvoutWindow addSubview:player's instance];
but here thing is the video is not displayed in device,
but you can control external window player from device.
cheers.

UIAudioPickerController for iPhone App?

Not sure what to call this, but I'd like to offer a way for users to pick and control their music from within my app. I've seen a few apps that offer an "iPod" button that appears to bring up the iPod app. Is this a built in control like the UIImagePickerController or have they simply duplicated all the functionality?
Check out the MediaPlayer framework. In particular, you're talking about the MPMediaPickerController
What I'm doing in Couch to 5k is inserting a UIView with a toolbar, labels, and an image view. The toolbar has the standard buttons for controlling the iPod music player. Then I'm using MPMusicPlayerController to control the iPod music playback.
Here's some sample code to get the iPod music player and what's playing:
musicPlayer = [MPMusicPlayerController iPodMusicPlayer];
item = musicPlayer.nowPlayingItem;
And then I register for NSNotification using the code provided in Apple's documentation on MPMusicPlayerController.