Context & Moment based Polls

In a sports app you can display context & moment based polls.


Running dynamic polls on game screen or live score screenof sports app–

  1. Initialize 320x50 ad view (Small_Ad) or 700x90 view inviewDidAppear method of live game screen


    - (void)viewDidAppear:(BOOL)animated {
    	if (adView == nil) {
    		adView = [[AdvBaralloc] initWithAppId:@"agn99648544b44ec90c327a5ab599eec"origin:CGPointMake(1024.0 – 320.0,748.0 - 50.0) 
    		// Based on the type of ad view you wish to integrate adType can be @"Square_Ad" or @"FullScreen_Ad" or @"700x90" (Detail View of a SplitViewController) or @"1024x90" (Full Width) or @"Small_Ad" (for a 320x50 ad)
    		adView.tag =232323;
    		adView.mydelegate = self;


    Use your app Id & ad unit Id received on registering this app and this screen (ad zone) in place of: initWithAppId:@"agn9648544b44ec90c327a5ab599eec"and adUnitId:2


  2. Set a timer that posts an ad trigger regularly at certain time intervals (while user is on the screen) with current game specific tags (and tags which match poll campaigns you wish to display)

    After adView initialization in viewDidAppear , set a timer.


    - [NSTimer scheduledTimerWithTimeInterval:180.0target:selfselector:@selector(PostAdTrigger) userInfo:nilrepeats:YES];



    - (void) PostAdTrigger	{
    	NSDictionary *dict = [[NSDictionaryalloc] initWithObjects:[NSArrayarrayWithObject:self.gameTags] 
    	// Pass comma separated game tags e.g., football,philly (or tags that match poll campaigns you want to display)
    	[[NSNotificationCenterdefaultCenter] postNotificationName:@"CustomTrigger"object:selfuserInfo:dict];
    - (void)dealloc {
    	adView.timeOutForQuestion = nil;
    	adView.calledBy = nil;
    	adView = nil;



Example Ad(Football App)–

Back to Top