how to mannualy start adrotator from code behind?!

Sep 11, 2013 at 9:26 PM
in the new version 2.02 i maybe have a stupid question but how to manualy start the adrotator to download the ads when i want to do it?! we had in version 1 the Invalidate() call but how do this on this version now? i want to turn off the Autostartads because i want to load first the content of my app then the adrotator should start, because my app downloads 90% of my apps content from the internet and it seems slower with this version of ad rotator... so i want to load my content first and then the adrotator.

and i also have a question about the progressindicator, i use it on every page but with adrotator only v2 it never stops if i come back from another page to the mainpage, why is that?! before i implemented v2 it stoped when the grid content (mainpage) is loaded, now it want stop and i see it throws some errors for adrotator.dll it looks like adrotator is downloading even if it not get focus...
Coordinator
Sep 12, 2013 at 9:32 AM
Well thankfully the answer to part 1 is quite simple, it's exactly the same as in V1. If you choose to not use the "autostart" feature then just call Invalidate as normal to start ad presentation.

As for your second question, I'd need a bit more detail on your implementation to answer. Are you saying a progressindicator you are using behaves differently if you have AdRotator on the page or is it a general question about a progressindicator?
If its a general question, then remember the Constructor is never called so check and update the status of you progressindicator in the onNaviagateTo event and not loaded or the constructor
Sep 12, 2013 at 3:19 PM
here is more of the background, i made an user control on a separate page for this adrotator, you suggested so and i call it in xaml via <local......./> and it work if its set to AutoStartAds, but how can i call invalidate from the code behind where i use this user control to invalidate?! i want to call it first when all my code is processed, my app downloads some rss and xaml from the internet and parses this and i have have a method that triggers after this is done, but how, before that i had AdrotatorSilverlight.Invalidate() now i can not use this anymore, in Adrotator itself there is no Invalidate...

and so far with the progressindicator i fixed it, i triggered it to stop after the last grid in the xaml page is loaded.

and can i post more questions here in this thread so i dont open any new?! i have also a question when will the remote/local house ads be available to the new version 2?! and will we have then the option to set a local housead that triggers if the remote one is not accessible? with the earlier version sometimes this "bug" happened to me with the remote one that if no ad is displayed by the other providers the remote housead is not displayed either.
Sep 16, 2013 at 3:09 PM
and i get a lot of there errors during debug, the app runs but in the background it stops my UI from beeing fluid...

An exception of type 'System.PlatformNotSupportedException' occurred in AdRotator.Core.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdRotator.Core.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdRotator.Core.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdRotator.Core.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdRotator.Core.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdRotator.Core.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdRotator.Core.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdRotator.Core.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdRotator.Core.DLL and wasn't handled before a managed/native boundary

...

An exception of type 'System.NullReferenceException' occurred in AdDuplex.WindowsPhone.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdDuplex.WindowsPhone.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdDuplex.WindowsPhone.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdDuplex.WindowsPhone.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdDuplex.WindowsPhone.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdDuplex.WindowsPhone.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdDuplex.WindowsPhone.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.NullReferenceException' occurred in AdDuplex.WindowsPhone.DLL and wasn't handled before a managed/native boundary

after coming back from a page in my app to the main page where ads are my app searches again for new ads and this block the UI. how? and can this be stoped or threaded to the background?!
Sep 16, 2013 at 3:14 PM
Edited Sep 16, 2013 at 3:14 PM
i have added the xap to my skydrive and if youe have time try it, the other pages are accessed thru the right side there are categories. if you tap on them and then if all loads and go back to the main page it happens quite often that you must wait 4-5 seconds so you can navigate again in the app. before this version of adrotator i had not these bugs.

skydrive to xap file of my wp8 app - http://sdrv.ms/196QZIf
Coordinator
Sep 16, 2013 at 3:54 PM
The platform exceptions are one's generated by AdRotator that simply note that a provider in your config is either unsupported on the platform you are using or you have not provided the dll for the relevant provider.

The null exceptions seem to be all generated by AdDuplex. Are you using the latest 2.0.2 alpha release, we corrected an oversight with the adsize parameter in AdDuplex which was made mandatory.

As for more questions, yes please feel free to use this thread.
Sep 16, 2013 at 4:00 PM
yes i use 2.0.2. alpha release. and my ads settings xml looks like this

<?xml version="1.0" encoding="utf-8"?>
<AdSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CultureDescriptors CultureName="en-US">
<Inmobi AppID="68ab81b9f33641dd87a0ce84b5acd7ac" Probability="20"/>
<AdMob AppID="pub-2699401642947480" Probability="13"/>
<AdDuplex AppId="33915" Probability="20"/>
<Smaato AppId="65774563" SecondaryId="923868083" Probability="7"/>
<MobFox AppId="5d2e5191ad49eee79ce00094785eb7e9" IsTest="false" Probability="20"/>
<InnerActive AppId="WPNovosti_WPNovosti_WP"  Probability="20"/>
<AdGroup Probability="0">           
    </AdGroup>
</CultureDescriptors>
<CultureDescriptors CultureName="de-DE">
<Inmobi AppID="68ab81b9f33641dd87a0ce84b5acd7ac" Probability="20"/>
<AdMob AppID="pub-2699401642947480" Probability="13"/>
<AdDuplex AppId="33915" Probability="20"/>
<Smaato AppId="65774563" SecondaryId="923868083" Probability="7"/>
<MobFox AppId="5d2e5191ad49eee79ce00094785eb7e9" IsTest="false" Probability="20"/>
<InnerActive AppId="WPNovosti_WPNovosti_WP"  Probability="20"/>
<AdGroup Probability="0">
</AdGroup>
</CultureDescriptors>
<CultureDescriptors CultureName="">
<Inmobi AppID="68ab81b9f33641dd87a0ce84b5acd7ac" Probability="20"/>
<AdMob AppID="pub-2699401642947480" Probability="13"/>
<AdDuplex AppId="33915" Probability="20"/>
<Smaato AppId="65774563" SecondaryId="923868083" Probability="7"/>
<MobFox AppId="5d2e5191ad49eee79ce00094785eb7e9" IsTest="false" Probability="20"/>
<InnerActive AppId="WPNovosti_WPNovosti_WP"  Probability="20"/>
<AdGroup Probability="0">
</AdGroup>
</CultureDescriptors>
</AdSettings>

maybe i have done something here wrong, i see the "stock" ads from mobfox, and adduplex, but inneractive, inmobi and smaato i dont see it. have i typed the names right above?! are the case sensitive? and all the dll for all the ads providers are the current ones. i tested this so far only on wp8 project and all the dll´s are for wp8.
Coordinator
Sep 16, 2013 at 4:26 PM
Nope, the config all looks fine as far as I can determine.
If you are not getting ads then it's more likely the providers themselves have no ads to serve (requesting an ad does not guarantee an ad)

If you drop AdDuplex from the config, do you get the same amount of exceptions?

Also, if you are not using the AdGroup (it's not implemented fully yet anyway) you can just drop that from the config, you only need to ad that which you are actually using (or want)
Also some providers won't serve ads on emulators and need a device (fyi)

Thanks for your help with the V2 Alpha, it's really appreciated
Sep 16, 2013 at 4:29 PM
i have found something, somehow the inneractive dll was gone from the project itself, now i cut i down to two null reference exceptions. i will try to delete the groups. and yes i am a supporter of you here :) i like your work a lot. i hope the release with the local/remote house ads is near?!
Coordinator
Sep 16, 2013 at 8:26 PM
Work is slow at the moment as both Gergely and I have other commitments but we try when we can.
By all means help out if you wish by Forking the repo and adding your mark.

Will update the ain page when we have more to announce.