Timer messed up using admob plugin?

I’m trying to show an interstitial admob banner but when returning from the shown video the timers in the game will not fire (continue).

I have a loading screen which should be moved out of screen when the scene is loaded.

I’m starting a timer with 500ms. Directly after the timer creation I show the interstitial video and when returning after the video it looks like the timer is never reaching the end of the 500ms to move the loading screen out of screen.

What am I missing here? What is the best practice to work with admob and timers while showing ads?

That’s odd. Are you sure the timer isn’t firing while the video ad is playing?

Personally, I would pause timers before showing the ad, especially if I didn’t know how long (video) the ad might be. Then, when the ad is hidden, I’d take the proper action.

Brent

@d.mach

May I ask why you need a timer of 500ms before you show an ad? 

Since ads are external events and not part of the Corona hierarchy, I’d follow Brent’s suggestion and pause any timers before showing an ad. Once the ad is closed you can resume the timer.

I thought the timer is automatically paused when a video is playing and then continued when the video is finished… so this probably is causing this because I guess the timer is firing during video playback.

We moved the ads show code to the end of the scene creation. The 500ms delay timer is for moving out the loading screen.

With the new info you gave me I think we should now only start timers when the ads are shown (finished showing I meant), right? Then probably looking into the ads listener for the ad finished event, right? What about devices with connection problems or things like that? Is it enough to look into the ads listener then for an error event (in addition to the finished watch event)? Then start timers when the event occures… correct?

Thx for your fast help with this!

I allow players to opt in to ads and use Vungle.  I have a hundreds of transitions and timers and none of them break when an ad is displayed.  The Corona runtime, including state, is simply paused for the duration of the ad and resumes perfectly when the ad is closed.  

It sounds like you want an ad to show on start up?  If so this is a great way to annoy your players.

With the new info you gave me I think we should now only start timers when the ads are shown (finished showing I meant), right? Then probably looking into the ads listener for the ad finished event, right? What about devices with connection problems or things like that? Is it enough to look into the ads listener then for an error event (in addition to the finished watch event)? Then start timers when the event occures… correct?

From what I can see, that seems to be your best bet.

That’s odd. Are you sure the timer isn’t firing while the video ad is playing?

Personally, I would pause timers before showing the ad, especially if I didn’t know how long (video) the ad might be. Then, when the ad is hidden, I’d take the proper action.

Brent

@d.mach

May I ask why you need a timer of 500ms before you show an ad? 

Since ads are external events and not part of the Corona hierarchy, I’d follow Brent’s suggestion and pause any timers before showing an ad. Once the ad is closed you can resume the timer.

I thought the timer is automatically paused when a video is playing and then continued when the video is finished… so this probably is causing this because I guess the timer is firing during video playback.

We moved the ads show code to the end of the scene creation. The 500ms delay timer is for moving out the loading screen.

With the new info you gave me I think we should now only start timers when the ads are shown (finished showing I meant), right? Then probably looking into the ads listener for the ad finished event, right? What about devices with connection problems or things like that? Is it enough to look into the ads listener then for an error event (in addition to the finished watch event)? Then start timers when the event occures… correct?

Thx for your fast help with this!

I allow players to opt in to ads and use Vungle.  I have a hundreds of transitions and timers and none of them break when an ad is displayed.  The Corona runtime, including state, is simply paused for the duration of the ad and resumes perfectly when the ad is closed.  

It sounds like you want an ad to show on start up?  If so this is a great way to annoy your players.

With the new info you gave me I think we should now only start timers when the ads are shown (finished showing I meant), right? Then probably looking into the ads listener for the ad finished event, right? What about devices with connection problems or things like that? Is it enough to look into the ads listener then for an error event (in addition to the finished watch event)? Then start timers when the event occures… correct?

From what I can see, that seems to be your best bet.