How to use InMobi (win 8)



In the example of V2 for win8 there is a code adding PubCenter component:
Win8AdRotator.PlatformAdProviderComponents.Add(AdRotator.Model.AdType.PubCenter, typeof(Microsoft.Advertising.WinRT.UI.AdControl));

How would I add InMobi?
Win8AdRotator.PlatformAdProviderComponents.Add(AdRotator.Model.AdType.Inmobi, typeof(...)



Closed Jun 14, 2014 at 11:36 AM by Darkside
InMobi working as expected however they are not serving ads presently? Issue with InMobi


Darkside wrote Oct 1, 2013 at 8:53 PM

I'll have to look into that but I suspect it's because of Pubcenter being a WinRT component and because it cannot be reflected. There was a good reason (just cannot remember why at the mo, it's been a while since I last looked at that code :D)

But you will notice there is no additional configuration for AdDuplex, the same can be said for InMobi.
Just add the reference to the project and add an entry in to the configuration file. This is the standard for most providers on all platforms, PubCenter is just an exception at the mo.

Will have to state that in the documentation more clearly for Win 8

Koto wrote Oct 2, 2013 at 5:24 PM

Hi Darkside

I looked in the output of Visual Studio and here what is:

Trying provider Inmobi
General exception [Windows.UI.Xaml.Markup.XamlParseException: XAML parsing failed.
at Windows.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
at InMobi.W8.AdSDK.IMAdView.InitializeComponent()
at InMobi.W8.AdSDK.IMAdView..ctor()] occured, continuing
Ads failed request for: Inmobi

My xml with adsettings is:
<?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="">
<AdDuplex AppId="1379" Probability="40"/>
<Smaato AppId="0" SecondaryId="0" Probability="0"/>
<PubCenter AppId="d25517cb-12d4-4699-8bdc-52040c712cab" SecondaryId="10043105" Probability="40"/>
<Inmobi AppId="ec9ea8fdfcc3436e94df0f5bcac3a227" Probability="20"/>
<AdGroup Probability="0">
  <AdDuplex AppId="1379" Probability="100"/>


Darkside wrote Oct 3, 2013 at 9:19 AM

I'll check this out today in case something has gone awry

prabhjotsingh wrote Oct 3, 2013 at 10:10 AM

Hi Koto,

In order to get Ad from InMobi using AdRotator, you simply have to add reference to InMobiW8AdSDK.dll. You don't need to explicitly add it using Win8AdRotator.PlatformAdProviderComponents.Add method.

You need to follow below steps to get test Ads from InMobi using AdRotator:
  1. Register with InMobi and Create InMobi AppID
  2. Download the updated bundle and add reference to the updated InMobi Windows 8 SDK.
  3. Follow the InMobi diagnostics flow to register your test WinRT device.
  4. Provide your InMobi AppId in the "defaultAdSettings.xml" in V2 example application.
  5. Test your app on WinRT tablet.
Link for InMobi Windows 8 Integration Guidelines

For your help, I'm sharing a modified AdRotator.Examples.Windows8 app with updated InMobi Windows 8 dll which you can download here and replace existing InMobi AppId with your AppId(step 1) in defaultAdSettings.xml file and register your test device(step 3) to start getting test ads.

Prabhjot Singh

Koto wrote Oct 3, 2013 at 4:01 PM

Hi prabhjotsingh,

Thank you for this precise/in depth explanation.

While reading it I realized I need to have tablet with winRT (which is indeed stated clearly in InMobi wiki), so I'll not have a chance to test it until I got one.



Darkside wrote Oct 3, 2013 at 4:33 PM

If you have a windows 8 machine that should work, worked fine in my tests, doesn't have to be RT

Koto wrote Oct 5, 2013 at 5:31 PM

Thank you Darkside, I'll check it.

GeekforChrist wrote Jan 8, 2014 at 4:31 AM

No, InMobi has some illogical terms that eliminate all use on laptops/desktops (aka: Windows 8)