I'm going to start looking at Windows RT export soon with Ads.
I've only done Paid Windows RT apps exported via Gideros in the past and sold them on the store with some success.
Is there a procedure to follow regards using Ads on this platform? as looking at the Ads plugin on export, I have no idea what to select as compared to Android for example to do the same thing.
I looked at the Microsoft dev panel regards Ads and setup a Test banner ad which I want to show in app. It has an ID but I don't know where to put it in the Gideros code or Ads Plugin or even how to call it.
Thanks.
Comments
Likes: pie
You can initialize WinRT ads with:
Likes: pie, MobAmuse
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
You will need to install Microsoft ads sdk from visual studio though...
Likes: MobAmuse
So far for testing I have in Lua code simply set require ads and ticked Ads plugin on export but don't actually call any ads just yet until I get the basic build process working below (see pic).
Likes: MobAmuse
I can find 'Microsoft Advertising SDK' which downloads and installs when I click on it but that's it, it does not seem it actually install in reality.
I am probably doing something very wrong
Could you possibly be more specific perhaps regards... 'then use your ad unit id (as defined in your microsoft account) as the ad type (first arg of load/show/etc methods).'
I have in Lua code and export as WinRT with Ads Plugin ticked...
require "ads"
pubcenter=Ads.new("pubcenter")
pubcenter:setKey("AppIDRemoved")
pubcenter:LoadAd("AdIDRemoved") ...on it's own runs thru OK tho it seems.
Once my code running on real device hits...
pubcenter:showAd("AdIDRemoved")
...it throws an exception and crashes.
Without pubcenter:showAd("AdIDRemoved") the code runs as normal.
Can you try:
pubcenter:showAd("250x250","AdUnitId") ?
Recognized formats are listed here: https://github.com/gideros/gideros/blob/master/plugins/ads/source/WinRT/Ads/frameworks/AdsPubcenter.cpp#L46, although I have no clue as where does this list come from...
Likes: MobAmuse
Here's a complete test example (main.lua) I tried and I get the attached screenshot
If I run the app without it being connected to VS it seems to work. I again get the black square if I press VIDEO and a tall black rectangle if I press V4VC
Then after a moment it says FreeWheel etc Ad Test00:00:15 in the square (which turns white)
Likes: MobAmuse
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
I tried both methods above but as soon as the code hits showAd(...any args method...) it throws this from real device in VS2015...
Exception thrown at 0x6B8E16FB (vccorlib120_app.dll) in giderosgame.WindowsPhone.exe: 0xC0000005: Access violation reading location 0x0000006C.
...even running the app as standalone on real device just crashes on showAd(...any args method...)
I've tried ads test mode and real ads mode but no go so far.
Exception thrown at 0x0F7E21C7 (vccorlib120_app.dll) in giderosgame.Windows.exe: 0xC0000005: Access violation reading location 0x0000006C.
...via VS2015 emulator on showAd(...)
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
it seems that showad is trying to access something that hasn't been initialized properly.
@hgy29 I will try that later and report back as stuck updating iOS apps at the moment.
Even more odd if I add... ad = nullptr; ...to line 30 you can now see VS2015 throw 46 new build errors? If I take the line out it's builds OK (see screenshot attached) ...What!?
I am using this test code based on john26's example but it still crashes (without that line 30 above of course)...
For now I have to move on though as more work awaits me elsewhere.
Likes: MobAmuse
No it still crashes exactly the same as before at showAd after rebuilding.
gdr_getRootView()->Children->Append(ad);
...If I comment it out the code runs but with no ad showing of course.
Likes: MobAmuse
Thanks.