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:
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" } )
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:
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:
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:
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:
There is a tool to help you with setting up your project: