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 )
Larry Meadows, Jr
Jump to content
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.
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.
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
the Corona Extension did not create one by default is there a reason for this?
Here is the link
You need to follow the instruction for 8.0, not 8.1. Have a look at this...
8.0 uses a "WMAppManifest.xml" file instead, which the above links tells you how to modify.
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.
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.
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.
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...
@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.
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.
Here is mine. You can copy past it if you like. Make sure that you can see the new view you add in your grid layout view. it might be off screen. Change your positioning as you need it. This is currently set for middle bottom.
That got it.
I did not think to place the Ad control inside the CoronaPanel. I had created a stack panel and was trying to get that to work.
But your way is better. On my little laptop the simulator went nuts flickering on every frame, but on the divice its smooth.
i added some funky code to toggle the ads on an off, with the Lua dispatch events but it is all working pretty well.
Let me clean up my code a bit and I'll upload it to my website. I'll try to tackle this on tuesday evening.
Thanks for the assist Rob and everyone else.
Community Forum Software by IP.Board