Admob Finishing status

I have used https://www.defold.com/community/projects/93085/ extension for display ads. but when user viewed reword video ad, they can close the ad before complete it. Is there any way(callback) to get ad status(complete/not complete)

facebook extension has this feature, “fbinstant.show_rewarded_video(ad_id, callback)”

Please help me

1 Like

In the listener function you first check the type of the event. According to the docs https://docs.spiralcodestudio.com/extension/admob/event/admob/type/ you need

if event.type == 'rewarded' then
end

Then, inside that according to other part of the docs https://docs.spiralcodestudio.com/extension/admob/event/admob/phase/ you check what was the resulting phase of ad display. To run code only in case of full ad viewing you check

if event.type == 'rewarded' then
  if event.phase == 'rewarded' then
    print('User got a reward!')
  end
end

Is that clear now?

3 Likes