Search Unity

Admob Reward Video events are not working properly

Discussion in 'Unity Ads & User Acquisition' started by rahat, Mar 14, 2018.

  1. rahat

    rahat

    Joined:
    Aug 21, 2012
    Posts:
    16
    I am facing a a problem in admob reward video. When the video is complete then it is calling the video close event instead of rewarded event.

    I have tested it with the sample code of google just putting some text field to track the events.

    Here is the code:
    public void HandleRewardBasedVideoClosed(object sender, EventArgs args)
    {
    text_2.text = "closed";
    text_1.text = "Closed";
    MonoBehaviour.print("HandleRewardBasedVideoClosed event received");
    }

    public void HandleRewardBasedVideoRewarded(object sender, Reward args)
    {
    text_1.text = "Rewarded";
    text_2.text = "Rewarded";
    string type = args.Type;
    double amount = args.Amount;
    MonoBehaviour.print(
    "HandleRewardBasedVideoRewarded event received for " + amount.ToString() + " " + type);
    }


    after completing the video always i got the closed message. please help me solving this problem
     
  2. Callie-Zhu

    Callie-Zhu

    Unity Technologies

    Joined:
    Mar 2, 2016
    Posts:
    42
    Have you requested new video before the current one being closed?
     
  3. RozekEnhance

    RozekEnhance

    Joined:
    Feb 2, 2017
    Posts:
    15
    You can try to use Enhance to integrate admob into your project to be sure there is no issue with the implementation.
    It takes a few minutes to integrate and you can choose to use other ad networks like unity as well with a few clicks on your mouse.

    For more info : https://goo.gl/VLvSoQ
     
  4. rahat090255

    rahat090255

    Joined:
    Aug 15, 2018
    Posts:
    18
    Sorry for late reply because i did not get any notification of it. No I did not request any video ad before closing i. and now i am using the latest admob plugin right now but still getting the same issue
     
  5. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @rahat090255

    It is up to the developer to configure which callbacks get called when a rewarded video is completed:
    https://developers.google.com/admob/unity/rewarded-video

    Can you confirm that the HandleRewardBasedVideoRewarded method is registered as the callback for the rewarded video? And can you confirm that you are only loading and showing rewarded videos?