How to show inmobi banner?

Hi~

I import SDKBOX for inmobi banner.

I want to show normal banner.

but, I don’t know how call banner.

Please tell me, sample code for cocos2d-js.

Hi,
May be You are looking for sdkbox.PluginInMobi.loadBanner();
You can find complete reference here - In Mobi JS Documentation

Tanks!

I found reference.

so, I wrote.

if (“undefined” != typeof(sdkbox.PluginInMobi))
{
var plugin = sdkbox.PluginInMobi;
plugin.loadBanner();
}

But, I can’t see banner.

I cheked ‘interstitial_placement_id’ and ‘account_id’.

should I change the other options?

So did you are trying on iOS or android.
Some time iOS doesn’t show up due to AppTransportSecurity issues.
Also check your banner_placement_id,height.
SDKBOX must be showing some logs for this.

Thank you for your kindness!!! :smile:

My mistake!

I changed the identifier ‘interstitial_placement_id’ to ‘banner_placement_id’.

So, I solved the problem. :stuck_out_tongue_closed_eyes:

1 Like

Goood… :+1:

Help! How to set banner position ? default top, i want set position to bottom.thanks!

Hello @blancell

Let me check, I will let you know soon.

@pabitrapadhy
Thanks!

Hi @blancell

I don’t see there’s a position setting parameter with this plugin.
What happens is some vendors give that privilege of changing ad positions and styles and some are not.

We will ask inmobi about this whether they have something like this in their sdk.

Best,
Pabitra

Hi,@pabitrapadhy
inmobi native ios sdk add banner code:

  • (void)viewDidLoad {
    [super viewDidLoad];
    self.banner = [[IMBanner alloc] initWithFrame:CGRectMake(0, 0, 320, 50)
    appId:@“Insert your placement ID here”
    adSize:IM_UNIT_320x50];
    self.banner.delegate = self;
    [self.view addSubview:self.banner];
    [self.banner loadBanner];
    }

can modify “CGRectMake” function position in sdkbox ?

Let us ask @nite to look into that, if possible then we may add in next release.

@pabitrapadhy
Thanks! :smile: