Can't get InMobi Plugin to work

I have set up inmobi ads, but corona simulator gives warning “plugin.inMobi” library is not available on this platform, so I built it for android there is no error while building. But when I open my app, after installation, ads doesn’t show up. My app is in development mode.These are my files: 

build.settings:

settings = { orientation = { default = "portrait", supported = { "portrait", }, }, android = { usesPermissions = { "android.permission.INTERNET", }, }, plugins = { ["plugin.inMobi"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, }, }

main.lua:

local inMobi = require( "plugin.inMobi" ) -- Pre-declare a placement ID local placementID = "PLACEMENT\_ID" local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization -- Load a banner ad inMobi.load( "banner", placementID ) elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded print( event.type ) print( event.placementId ) elseif ( event.phase == "failed" ) then -- The ad failed to load print( event.type ) print( event.placementId ) print( event.isError ) print( event.response ) end end -- Initialize the InMobi plugin inMobi.init( adListener, { accountId="ACCOUNT\_ID" } )

Thank you for the help.

InMobi is not going to work in the simulator. You will have to test it on a real device. While testing on a real device, problems will show up in your devices console log. For Android that means using “adb logcat” or the “monitor” tool to see these messages. There is a version of the “adb logcat” command that filters out all but Corona messages. Google devices produce a lot of noise in their logging. However when using a 3rd party service like InMobi you have to see all the messages. Please run “adb logcat” with no extra parameters. If you need help with that, please read:

http://docs.coronalabs.com/guide/basics/debugging/index.html

Also above you have ACCOUNT_ID and PLACEMENT_ID. In your code are you putting real values there?

Rob

Hi Rob

Thanks for the quick reply. I have given real values for ACCOUNT_ID and PLACEMENT_ID.

The problem is I have tried Corona Ads, InMobi, adMob, adColony and chartBoost, nothing works.

For Corona Ads, I am waiting for approval.

I will try to get the logs and paste them here.

Thanks

@mabcd71,

  1. I see you’re trying to use markdown formatting for code ``` Thanks for trying to format the code, but that notation won’t work here.  See the image below:

formatyourcode.jpg

  1. There is a tool to help you with setting up your project:

InMobi is not going to work in the simulator. You will have to test it on a real device. While testing on a real device, problems will show up in your devices console log. For Android that means using “adb logcat” or the “monitor” tool to see these messages. There is a version of the “adb logcat” command that filters out all but Corona messages. Google devices produce a lot of noise in their logging. However when using a 3rd party service like InMobi you have to see all the messages. Please run “adb logcat” with no extra parameters. If you need help with that, please read:

http://docs.coronalabs.com/guide/basics/debugging/index.html

Also above you have ACCOUNT_ID and PLACEMENT_ID. In your code are you putting real values there?

Rob

Hi Rob

Thanks for the quick reply. I have given real values for ACCOUNT_ID and PLACEMENT_ID.

The problem is I have tried Corona Ads, InMobi, adMob, adColony and chartBoost, nothing works.

For Corona Ads, I am waiting for approval.

I will try to get the logs and paste them here.

Thanks

@mabcd71,

  1. I see you’re trying to use markdown formatting for code ``` Thanks for trying to format the code, but that notation won’t work here.  See the image below:

formatyourcode.jpg

  1. There is a tool to help you with setting up your project: