Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Admob Banner Ads on WP8
Started by schizoid2k Jan 14 2016 02:24 PM

6 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

schizoid2k

[GLOBAL: userInfoPane.html]
schizoid2k
  • Contributor

  • 559 posts
  • Corona SDK

Has anyone gotten AdMob banner ads to work on the WinPhone build?  Info about this seems very scarce.

 

Looking at Google's example, and an old thread here, I think I was successful, but I am not sure... in the emulator, I see a white bar where the ad should be, but I do not see an actual ad.  I also don't know if the ad is updating.

 

Not having a Windows Phone, it's a bit difficult to confirm.

 

Do ads show in the Windows emulator?

 

Thanks,



[TOPIC: post.html]
#2

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

@spacewolf was kind enough to write up a tutorial and sample code on how to integrate AdMob into a WP8 CoronaCards app.  Have a look here...

   http://www.spacewolfsoftware.com/blog/tutorial-add-admob-interstitial-ads-to-your-corona-windows-phone-8-app/



[TOPIC: post.html]
#3

schizoid2k

[GLOBAL: userInfoPane.html]
schizoid2k
  • Contributor

  • 559 posts
  • Corona SDK

Thanks Joshua,

 

I did look at the article, but it only mentions interstitial, not banner ads.  It's a great article, but I don't think it fits the bill in this case.

 

Looking at Google's banner ad example, there is much less code required it seems, since SpaceWolf's article is handling the display of interstitial ads instead of a continuous update of banner ads.

 

--john



[TOPIC: post.html]
#4

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Google documents how to add an "AdView" to your WP8 app's page here...

   https://developers.google.com/admob/wp/quick-start#adding_a_banner_ad

 

See the "Define an ad banner with code" section.

 

And the one thing you would do different is add the AdView as a child to your "fCoronaView" so that it would appear on top of the Corona view.  For example...

 

fCoronaPanel.Children.Add(bannerAd);



[TOPIC: post.html]
#5

schizoid2k

[GLOBAL: userInfoPane.html]
schizoid2k
  • Contributor

  • 559 posts
  • Corona SDK

Thanks Joshua!  Got it working..  I wasn't seeing an ad since I had ForceTesting = false;

 

It looks like the ads are displaying. I assume in live mode the ads would cycle?



[TOPIC: post.html]
#6

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Great!  I'm glad you got it working!  :)

Regarding ad banner cycling, I don't remember, but I have the impression that you might have to do this manually via a timer and their AdRequest class and AdView.LoadAd() method.



[TOPIC: post.html]
#7

schizoid2k

[GLOBAL: userInfoPane.html]
schizoid2k
  • Contributor

  • 559 posts
  • Corona SDK

Hmm... I will check into that.  I do get a test ad, but it does not appear to cycle, so I will do a little more research and review the Google example as well.

 

Thanks for your help




[topic_controls]
[/topic_controls]