Hiding revmob banners when playing videos and certain screens - iphone

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.

Related

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

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

iPad - Custom Movie Player Like GQ Magazine App

I'm developing an iPad magazine App.
While researching other apps I thought the GQ one was the best.
I would like to implement a similar custom movie player in my app. It would include a Play button, pause button, stop button, and slidebar along with the player.
I'm looking for ideas on how GQ implements a player like this or how I may go about creating my own.
MPMoviePlayerController
UIButton
UISlider

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.

Playing video in a Customview like iPad feature

When we call MPMoviePlayerController.play method, the movie player is opened and the video is played in a separate full screen. is it possible to play a video in a custom view, that is I have an image added on a view, when this image is clicked, the image has to be removed and the video has to play there itself as the feature in iPad.
Non-full screen playback of video is possible in iPhone OS 3.2 for iPad.
If you are porting an application that uses the MPMoviePlayerController class of the Media Player framework, you must change your code if you want it to run in iPhone OS 3.2. The old version of this class supports only full-screen playback using a simplified interface. The new version supports both full- and partial-screen playback and offers you more control over various aspects of the playback.
On the full-screen question, see this section of the iPad Programming Guide for further information, and this property of MPMoviePlayerController specifically.
Bear in mind that you can still only play one video at a time, and that this is only currently possible for iPad.
Not using MPMoviePlayerController, no.
You might be able to achieve this using a custom movie player, but I haven't seen one in the wild yet, and I don't know how it would be done.

Customizing the screen of Movieplayer in iPhone

I've few doubts regarding movie player app
How can I customize the screen size. I want only video or movie to be played only to half the screen and I want to add custom controls buttons to the remaining half of movie player.
In movie player example overlay view is there but how to change the name of the button and label in that and I'm unable to do that.
The MPMovePlayer UI cannot be modified. It plays fullscreen video, and provides the default controls. There's currently no way to do what you need in the official iPhone SDK.
Use this link for video player customization:
https://developer.apple.com/library/ios/samplecode/MoviePlayer_iPhone/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007798
download sample code and modify accordingly.