Admob for Windows Phone 8

Monkey Forums/Monkey Programming/Admob for Windows Phone 8

Xaron(Posted 2013) [#1]
So after ages Admob finally made a SDK to use for Windows Phone 8.

Mark, could you please integrate this into Monkey as well like you did for Android and iOS?

https://developers.google.com/mobile-ads-sdk/download#downloadwp


SLotman(Posted 2013) [#2]
Although I'm struggling with instability on WP8, I would love admob on it too...


Xaron(Posted 2013) [#3]
Well I'll do that probably sooner than later if Mark has no time for now. ;)


SLotman(Posted 2013) [#4]
Hmmm... I'm trying here at least to see the ad, but where do I get the ad unit code? On admob website I see only android/ipad/iphone and nothing else...


SLotman(Posted 2013) [#5]
Ok, I managed to get it (somewhat) working. This is my findings, but since I'm no specialist, I may be missing something:

The bad news:
As PubCenter, this sdk is all c#. The monkey winrt solution is divided into two projects: MonkeyGame in c#, which is basic a xaml view and MonkeyGame.PhoneComponent, where the actual game is.

The SDK and the adview goes into the c# project... which your game, in the c project has no access. So you can display ads, but you can't control them - once on screen, they'll stay there - you can't hide it, or reload it.

Also, I found a bug: in Landscape view, I don't remember now if it was LandscapeLeft or LandscapeRight, the ad appears "mirrored" and upside down. Don't know if this is some problem with admob SDK, or if it is on Monkey side.

If you want to try yourself, just import the admob dll into the "MonkeyGame" project, and on MainPage.xaml.cs, after InitializeComponent() add this:



It's important to have the try/catch otherwise if you're not connected your game will crash.


Xaron(Posted 2013) [#6]
Nice! Thanks for trying! I'll check it out.