Windows Phone Silverlight 8.1 app
I have a huge problem with loading ads from AdMob on my Lumia 730. Currently, I have 4 different ads in my app (which is SILVERLIGHT 8.1 , NOT 8.0, and not 8.1 WP) and unfortunately, I always get the same error from each page on which particular ad exists: "Failed to receive the ad with error NoFill"
I don't know what should I do, I think I tried everything, and now I'm out of ideas.... :(
As my ad didn't show on screen I created a new, blank app where I could test all the possibilities. That new app has only one element - Google Ad Baner...
What I tried:
1. Turned on all capabilities possible in this app.
By the way I can't find anywhere capabilities needed for Silverlight 8.1 app? Only info which I found was for Silverlight 8.0, but capabilities for 8.1 are completely different...
2.Tried to create a banner from code:
AdView bannerAd = new AdView
{
Format = AdFormats.Banner,
AdUnitID = "ca-app-pub-00000000000/000000000"
};
bannerAd.ReceivedAd += OnAdReceived;
bannerAd.FailedToReceiveAd += OnFailedToReceiveAd;
LayoutRoot.Children.Add(bannerAd);
AdRequest adRequest = new AdRequest();
bannerAd.LoadAd(adRequest);
Result: Emulator: OK Device: Failed to receive the ad with error NoFill
3. Tried to create a banner from XAML:
<GoogleAds:AdView AdUnitID="ca-app-pub-00000000000/000000000" Format="BANNER" FailedToReceiveAd="failToReceive"/>
Result: Emulator: OK, device: Failed to receive the ad with error NoFill
4.Tried to turn on ForceTesting option...
adRequest.ForceTesting = true;
Result: Emulator: OK
Device: Failed to receive the ad with error NoFill !?
This is really strange that ad does not appear even if the testing mode is turned on? My app is in Silverlight 8.1 so it should be supported. An interesting fact is that on my admob page I see the requests...but I also see IMPRESSIONS - probably after testing app in the emulator, as their ads are visible!!!
So I don't get it at all, why ads are visible in the emulator (which is Windows 8.1) and they are not visible on my phone (8.1 too)?
I'm totally confused...
Please, help me.
Luke
I have implemented all possible Ad integration on Windows Phone 8.0,8.1 and then UWP.
As some comments suggested, Windows 8.1 has a varying list of capabilities. Primarily, only the Phone Dialer, Internet and Location capabilities are needed for an ad to work.
However, there are some settings on the OS that may restrict the use of the unique device's advertising ID with Apps that render ads from non-Microsoft Ad networks. Hence, a user that has the checkBox turned off may not likely receive ads from Apps that contains ads.
Furthermore, you should try to test your app on multiple physical devices. Testing on just a single device is not the best option for a software developer.
Possible solution: Apart from the capability dilemma, you really have to build a project according to the processor type supported by the ad network. Strange? I experienced issues years ago with building 64bit version of my app while the ad element (xaml control) is present.
Note: Most Windows Phone 8 and 8.1 emulators do not run on ARM processor which makes debugging swift and seamless unlike. However, physical devices available run on ARM which would require you to build specifically for ARM and not ALL_CPU.
Finally, Building for Windows Phone 8.0 or 8.1 seems less irrelevant in 2018. I strongly recommend you switch and also encourage your employer/team to move to Windows 10 (UWP) app creation. You have more choices and more *Support for that at the moment.
链接地址: http://www.djcxy.com/p/32274.html