Ads on Phone 8

Just a Quick Question on Phone Ads

For ads on Windows Phone 8 and 8.1 ( using Corona Cards ) is the preferred method to just use Microsoft’s Ad API?

Or Is corona looking to add the ( Corona Ads system )

Thanks

Larry Meadows, Jr

Currently, we have no plans on adding ads support on WP8.  At least in the next several months.  We’re more focused on polishing up our core features right now.  For example, we’re in the middle of adding support for our Lua “network” library for async http communications.

But you should be able to easily implement ad support for yourself via C#.  Microsoft’s ad library is pretty simple to use.  And we have an example on how to communicate between Lua and .NET (link below) so that you can show/hide ads via Lua.

   http://docs.coronalabs.com/daily/coronacards/wp8/index.html#lua-interop-communications

If you need help, just let me know.  Although I’ve seen that you’ve already implemented in-app purchase, so, you might already be an expert in Lua/.NET bridging now.  :slight_smile:

Not a problem, that is just what I expected.

When I am done getting the kinks of my app then I’ll create a sample APP and post the code :slight_smile:

Larry

You posting some sample code would be greatly appreciated!

If you have anything blocking you or features needed in the near future, then please let us know.  It’ll help us prioritize what we need to work on next.  Thanks!

Very nice thanks, yeah when I get that far I’ll let you know.

Larry

I am walking Throuhgh the Windows Phone 8.1 Ads tutorial to create a sample app.

the tutorial says I need a Package.appxmanifest file…

Add the Internet (Client & Server) Capability to the Package.appxmanifest. In Solution Explorer , double click

Package.appxmanifest.

the Corona Extension did not create one by default is there a reason for this?

Here is the link

http://msdn.microsoft.com/en-US/library/advertising-mobile-windows-phone-ads-walkthroughs-81-silverlight-markup%28v=msads.20%29.aspx

Thanks

Larry

You need to follow the instruction for 8.0, not 8.1.  Have a look at this…

   http://msdn.microsoft.com/en-US/library/advertising-mobile-windows-phone-ads-walkthroughs-8-silverlight-markup(v=msads.20).aspx

8.0 uses a “WMAppManifest.xml” file instead, which the above links tells you how to modify.

I have just successfully got admob interstitial working. Its a little buggy though.

BTW I have tried some ad methods.

I cant figure out Admob banner yet as the guide Google gives seems incorrect as it asks to look for an adView in the toolbox and its not there or doesnt seem to be included in the latest dll. I will come back to this later.

Admob Interstitial work but they seem to exit the app and not suspend so this is okay on boot but if you fire it up, it will exit and re launch the app. It is the same as if you had “exit on suspend” on the build settings set to true. Admob  Interstitial  usually suspend on Android but on Windows it exits and relaunches and if you were halfway through gameplay this will obviously reset unless you had some boot check to reload exact status of game (a pain). Anyway this is fine on boot up only.

I have also got Windows pub center ads banner working too. It works pretty well apart form some topics dont seem to fit in the window properly. I have even created more than one instances of a banner.

Hmmm… interesting.

In my testing, I’ve noticed that if you navigate to another XAML page within your own app, it actually “unloads” the previous page and all of its XAML controls, which would include the CoronaPanel XAML control.  Our CoronaPanel control is set up to terminate (ie: applicationExit) the Corona runtime when the control has been unloaded.  So, I’m thinking that the AdMob interstitial ad must be hosted in its own XAML page.  That’s probably what’s going on.  The problem is that we need that “Unloaded” event in order to tell if your are backing out of the app or removing the control from the page.

I’ll see about looking into a solution for this next week.  Ideally, Corona should not raise an “applicationExit” when navigating to another page, such as an interstitial AdMob ad.  (Ideally, Microsfot’s XAML shouldn’t unload the previous page and controls when navigating to another page too, but it is what it is.)

That’s the right thing to do.  We’ve designed our CoronaPanel control to be a container for other controls so that we could someday add native TextBox, WebView, Maps, and AdBanner support in the future.  Feel free to take advantage of it.

But that said, I’m pretty sure that the AdMob library is display an interstitial ad as a separate page.  Which means it doesn’t matter where you position it in your page.  I think the position you put it in your page only matters for ad banners.

Also, my understanding is that Microsoft’s interstitial ads are not displayed on a separate page.  But I’m guessing that AdMob has much more inventory for different regions which is the advantage on using it.

Sorry. I realised I copied in the windows banner ad markup not the admob one. I will look at this layer and see if I can place the admob one in there. I deleted then realised you had just replied. Sorry

Oh and I mentioned before but I couldn’t see the adView component from google ads.dll file. In the docs you on,y get that control for admob banners, with the interstial I have to “use” the dll and instance the class and invoke it with the id. I can’t do much else with it. I have tried bringing up the ad without creating another class but it doesn’t work so I think it removes itself.

Rob,

We have a new version of CoronaCards that we’ll be sending out soon that resolves the AdMob interstitial ad issue.  Corona will now correctly suspend when displaying an interstitial ad and resume (instead of restarting) when backing out of the ad.  Thanks for bringing this issue up.

Great news Joshua. This week you lot have added some handy bits and bobs. Nice one!

@doubleslashdesign were you able to get the ad coding working correctly? I’m very interested in seeing the sample code :slight_smile:

I was able to get it to working last Monday.  I modified Google’s AdMob C# interstitial ad sample project to run Corona and confirmed that it could fetch/display an ad and then resume Corona.  You’ll need build #2449 to do it  Rob, I hope it worked out for you too.

spacewolf, I was using Google’s AdMob library provided here…

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

I haven’t used the update yet but I did have admob and windows banners working, it all went rather easily considering I’ve never used visual studio until a month ago :slight_smile: I didn’t mind the interstertials only on boot anyway as that’s the important one. I will report back next week when I try a new port.

@spacewolf I did get a simple version of the windows 8 ads working. it was very easy.

I’ll spend some time to get the ad working in my corona sample template, it should be pretty easy.

Luck for me with the new Corona update navigation away and back to the app should be fixed with pause and resume, so this could be pretty cool.

I’ll post the code after I get it working.

Larry

I am very close on this now. I added the Microsoft Windows Ads into my sample corona project.

everything is coming up on my screen. But I have the following issues.

  1. I don’t see the ads ( i think this has something to do with my Grid layout - I am not sure yet )

  2. with the ad code in place I can no longer touch the actual corona screen for some reason.

i will continue to monkey around with it.