Hello everyone,
I am not getting banner ads of inmobi adnetwork. I don’t understand what’s the problem as I am able to fetch interstitial ads.
Here is my code
inMobiAds.lua
local inMobi = require( "plugin.inMobi" ) local accID = "MY Account ID" local placementBannerID = "my banner id" local placementInterstitialID = "my interstitial id" local function adsListener( event ) if ( event.phase == "init" ) then inMobi.load( "interstitial", placementInterstitialID ) inMobi.load( "banner", placementBannerID ) elseif ( event.phase == "failed" ) then print( "Ad Failed" ) end end function adsInitialize() inMobi.init( adsListener, { accountId=accID } ) end function showInterstitialAds() inMobi.show( placementInterstitialID, { yAlign="top" } ) end function showBannerAds() inMobi.show( placementBannerID, { yAlign="top" } ) end
main.lua
require "inMobiAds" function myMain() adsInitialize() showBannerAds() end myMain()
Log File
Here is an error but don’t know how to rectify it.
Failed to fetch ad for placement id: 1506098500582, reason phrase available in onAdLoadFailed callback
09-30 16:01:23.066 1131 1432 I ActivityManager: Start proc 17723:com.games.plugin/u0a137 for activity com.games.plugin/com.ansca.corona.CoronaActivity 09-30 16:01:23.168 17723 17723 E linker : readlink('') failed: No such file or directory [fd=17] 09-30 16:01:23.168 17723 17723 E linker : warning: unable to get realpath for the library "/data/app/com.games.plugin-1/oat/arm/base.odex". Will use given name. 09-30 16:01:23.302 17723 17723 E linker : readlink('') failed: No such file or directory [fd=18] 09-30 16:01:23.303 17723 17723 E linker : warning: unable to get realpath for the library "/data/app/com.games.plugin-1/lib/arm/liblua.so". Will use given name. 09-30 16:01:23.319 17723 17723 E linker : readlink('') failed: No such file or directory [fd=18] 09-30 16:01:23.320 17723 17723 E linker : warning: unable to get realpath for the library "/data/app/com.games.plugin-1/lib/arm/libjnlua5.1.so". Will use given name. 09-30 16:01:23.334 17723 17723 I art : Thread[1,tid=17723,Native,Thread\*=0xb850d290,peer=0x739afc48,"main"] recursive attempt to load library "/data/app/com.games.plugin-1/lib/arm/libjnlua5.1.so" 09-30 16:01:24.125 17723 17736 V Corona : \> Class.forName: network.LuaLoader 09-30 16:01:24.126 17723 17736 V Corona : \< Class.forName: network.LuaLoader 09-30 16:01:24.127 17723 17736 V Corona : Loading via reflection: network.LuaLoader 09-30 16:01:24.140 17723 17736 I Corona : Platform: Micromax Q402 / ARM Neon / 6.0 / Mali-400 MP / OpenGL ES 2.0 / 2017.3135 / English | US | en\_US | en 09-30 16:01:24.166 17723 17736 V Corona : \> Class.forName: shared.google.play.services.base.LuaLoader 09-30 16:01:24.167 17723 17736 V Corona : \< Class.forName: shared.google.play.services.base.LuaLoader 09-30 16:01:24.167 17723 17736 V Corona : Loading via reflection: shared.google.play.services.base.LuaLoader 09-30 16:01:24.180 17723 17736 V Corona : \> Class.forName: \_CoronaSetup.LuaLoader 09-30 16:01:24.242 17723 17736 V Corona : \> Class.forName: plugin.inMobi.LuaLoader 09-30 16:01:24.243 17723 17736 V Corona : \< Class.forName: plugin.inMobi.LuaLoader 09-30 16:01:24.244 17723 17736 V Corona : Loading via reflection: plugin.inMobi.LuaLoader 09-30 16:01:24.252 1131 1189 D WindowManager: \*\*\*\* Removing window Window{8f4a9a1 u0 Starting com.games.plugin}: count=1 Callers=com.android.server.wm.WindowManagerService.removeWindowInnerLocked:28 09 09-30 16:01:24.277 17723 17723 I Corona : plugin.inMobi: 1.1.6 (SDK: 7.0.0) 09-30 16:01:24.345 17723 17756 D [InMobi]: Permissions granted to SDK are : 09-30 16:01:24.345 17723 17756 D [InMobi]: android.permission.INTERNET 09-30 16:01:24.345 17723 17756 D [InMobi]: android.permission.ACCESS\_NETWORK\_STATE 09-30 16:01:24.369 17723 17736 E linker : readlink('/proc/self/fd/39') failed: Permission denied [fd=39] 09-30 16:01:24.370 17723 17736 E linker : warning: unable to get realpath for the library "/data/app/com.games.plugin-1/lib/arm/liblicensing.so". Will use given name. 09-30 16:01:24.381 17723 17736 V Corona : \> Class.forName: CoronaProvider.licensing.google.LuaLoader 09-30 16:01:24.382 17723 17736 V Corona : \< Class.forName: CoronaProvider.licensing.google.LuaLoader 09-30 16:01:24.407 17723 17736 V Corona : Loading via reflection: CoronaProvider.licensing.google.LuaLoader 09-30 16:01:24.412 17723 17736 I Corona : InMobi event: initialization successful 09-30 16:01:29.399 17723 17723 D [InMobi]: Fetching a Banner ad for placement id: 1506098500582 09-30 16:01:29.414 17723 17773 D [InMobi]: Publisher device Id is b388b54c-7ade-434f-adb4-056002318d18 09-30 16:01:30.956 17723 17723 D [InMobi]: Failed to fetch ad for placement id: 1506098500582, reason phrase available in onAdLoadFailed callback. 09-30 16:01:30.978 17723 17736 I Corona : InMobi event: banner ad failed to load.
Any help would be highly appreciated. I am stuck here from past two weeks.
Please help me out.
Thanks,
This is how I have created my placements inside inmobi account.