Inmobi Ads Not Showing On Android

Hi,

I’m trying to embed inMobi ads in my Android app, but they just aren’t showing up.

I’ve used the app id code I’ve been given by InMobi (the game is already live on Google Play). That didn’t work, so I used the test code instead, still not working (I’ve set test mode both false and true):

local ads = require “ads”

ads.init( “inmobi”, “4028cb962895efc50128fc993f9f025a” )

– Set the ads (updates every 60 seconds)

ads.show( “banner320x48”, { x=0, y=100, interval=20, testMode=true } )

I also set the permissions:

    androidPermissions = {

          “android.permission.INTERNET”,

                 “android.permission.ACCESS_NETWORK_STATE”,

         “android.permission.READ_PHONE_STATE”,

      },

I am testing on device, not the simulator. When on simulator it is throwing the following warnings:

WARNING: The ‘ads’ provider (inmobi) is not available on the simulator

WARNING: The ‘ads’ library is not available on this platform.

…not sure what the ‘not available on platform’ is all about…

Is anyone able to assist? No luck after 3 hours of trying different options.

Many thanks,

Andy

…ok, forget it, in the build setting I still had:

 [[–

 --]]

around the permissions.

A proper newbie mistake, but I’m still only a coupla days into using Corona.

…ok, forget it, in the build setting I still had:

 [[–

 --]]

around the permissions.

A proper newbie mistake, but I’m still only a coupla days into using Corona.

i have the same problem here but im not forget the [[-- --]] in the build settings

my build settings:

[lua]

– Supported values for orientation:
– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

settings = {
    
    orientation = {
        default = “landscape”,
        supported = { “landscape”, }
    },
    
    iphone = {
        plist = {
            UIStatusBarHidden = false,
            UIPrerenderedIcon = true, – set to false for “shine” overlay
            --UIApplicationExitsOnSuspend = true, – uncomment to quit app on suspend

            --[[
            – iOS app URL schemes:
            CFBundleURLTypes =
            {
                {
                    CFBundleURLSchemes =
                    {
                        “fbXXXXXXXXXXXXXX”, – example scheme for facebook
                        “coronasdkapp”, – example second scheme
                    }
                }
            }
            --]]
        }
    },
    
    
    – Android permissions

    androidPermissions = {
          “android.permission.INTERNET”,
                “android.permission.ACCESS_WIFI_STATE”,
                “android.permission.READ_PHONE_STATE”,
                “android.permission.ACCESS_NETWORK_STATE”,
                
      },

    
}

[/lua]

[lua]

local ads = require “ads”

local function adListener( event )
    if event.isError then
        – Failed to receive an ad.
    end
end

ads.init( “inmobi”, "b11487856ab74d699fee9c02bc9378aa ", adListener )
ads.show( “banner320x48”, { x=0, y=100, interval=60, testMode=false } )

[/lua]

something wrong?

i have the same problem here but im not forget the [[-- --]] in the build settings

my build settings:

[lua]

– Supported values for orientation:
– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

settings = {
    
    orientation = {
        default = “landscape”,
        supported = { “landscape”, }
    },
    
    iphone = {
        plist = {
            UIStatusBarHidden = false,
            UIPrerenderedIcon = true, – set to false for “shine” overlay
            --UIApplicationExitsOnSuspend = true, – uncomment to quit app on suspend

            --[[
            – iOS app URL schemes:
            CFBundleURLTypes =
            {
                {
                    CFBundleURLSchemes =
                    {
                        “fbXXXXXXXXXXXXXX”, – example scheme for facebook
                        “coronasdkapp”, – example second scheme
                    }
                }
            }
            --]]
        }
    },
    
    
    – Android permissions

    androidPermissions = {
          “android.permission.INTERNET”,
                “android.permission.ACCESS_WIFI_STATE”,
                “android.permission.READ_PHONE_STATE”,
                “android.permission.ACCESS_NETWORK_STATE”,
                
      },

    
}

[/lua]

[lua]

local ads = require “ads”

local function adListener( event )
    if event.isError then
        – Failed to receive an ad.
    end
end

ads.init( “inmobi”, "b11487856ab74d699fee9c02bc9378aa ", adListener )
ads.show( “banner320x48”, { x=0, y=100, interval=60, testMode=false } )

[/lua]

something wrong?

same problem, anyone knows solution??

Hello @tunnelstudios, @kizzwiz,

Did you properly configure the InMobi plugin according to the ads documentation? Please follow all of the steps carefully and see if that solves the issue:

http://docs.coronalabs.com/guide/monetization/adSupport/index.html

Sincerely,

Brent Sorrentino

Is it possible to test inmobi ads on simulator?

same problem, anyone knows solution??

Hello @tunnelstudios, @kizzwiz,

Did you properly configure the InMobi plugin according to the ads documentation? Please follow all of the steps carefully and see if that solves the issue:

http://docs.coronalabs.com/guide/monetization/adSupport/index.html

Sincerely,

Brent Sorrentino

Is it possible to test inmobi ads on simulator?

An error occurs when you connect InMobi «ads library is not available on this platform» who can help you do everything according to the instructions. main.lua
local ads = require “ads”

– initialize ad network:
if appID then
    ads.init( adNetwork, appID )
end

local function adListener( event )
    if event.isError then
        – Failed to receive an ad.
    end
end

ads.init( “inmobi”, “36a10659ba4549c4bd5a7196279dc777”, adListener )
ads.show( “banner320x48”, { x=0, y=100, interval=60, testMode=false } )

build.settings

plugins =
    {
        – key is the name passed to Lua’s ‘require()’
        [“CoronaProvider.ads.inmobi”] =
        {
            – required
            publisherId = “com.coronalabs”,
        },
    },      

tell me how to cope with the problem

An error occurs when you connect InMobi «ads library is not available on this platform» who can help you do everything according to the instructions. main.lua
local ads = require “ads”

– initialize ad network:
if appID then
    ads.init( adNetwork, appID )
end

local function adListener( event )
    if event.isError then
        – Failed to receive an ad.
    end
end

ads.init( “inmobi”, “36a10659ba4549c4bd5a7196279dc777”, adListener )
ads.show( “banner320x48”, { x=0, y=100, interval=60, testMode=false } )

build.settings

plugins =
    {
        – key is the name passed to Lua’s ‘require()’
        [“CoronaProvider.ads.inmobi”] =
        {
            – required
            publisherId = “com.coronalabs”,
        },
    },      

tell me how to cope with the problem

planshekta, your code seems fine to me. check your intenet connection. Perhaps that is the cause of it. 

planshekta, your code seems fine to me. check your intenet connection. Perhaps that is the cause of it.