InMobi playing ad over my background music?

Hello everyone,

I used InMobi plugin in one of my corona applications. The problem is InMobi plays interstitial ads over my background music.

What I want is to pause the music when ad starts and resume it back once the ad is done.

I have also used Vungle plugin and I handled it over there but in InMobi I am not able to understand where to put the code.

Here is how I handled it in Vungle File:

local function vungleAdListener( event )        if ( event.type == "adInitialize") then        isInit = true                          end     if (event.type == "adAvailable" ) then                 pauseMusic()     end     if ( event.type == "adEnd" ) then         resumeMusic()     end     if ( event.type == "vungleSDKlog" ) then         logText.text = event.message     end end

This is my InMobi file

local function adInitListener( event )       if ( event.phase == "init" ) then  -- Successful initialization         inMobi.load( "interstitial", placementInterstitialID )      elseif ( event.phase == "loaded" ) then               pauseMusic()              elseif ( event.phase == "failed" ) then         print( event.response )     end end

Is there any event type like “adEnd” in InMobi?

Any help would be highly appreciated.

Thanks

There is an event phase when the ad is closed. See:

https://docs.coronalabs.com/plugin/inmobi/event/adsRequest/phase.html

Rob

Thank you so much. Worked like a charm.

:)))

There is an event phase when the ad is closed. See:

https://docs.coronalabs.com/plugin/inmobi/event/adsRequest/phase.html

Rob

Thank you so much. Worked like a charm.

:)))