如何知道我的丛林广告完全被用户看到了?

时间:2017-06-27 07:39:45

标签: android vungle-ads

我在我的应用中使用了vungle app-id,我想增加用户的钱包,只有当用户完全看到视频广告时。

//我的活动中的代码

  final VunglePub vunglePub = VunglePub.getInstance();
        final String app_id= "58d46c1feba9a90a1a000011"; //vungleid
        vunglePub.init(this,app_id);
        final EventListener vungleListener= new EventListener() { 
            @Override
            public void onAdEnd(boolean b, boolean b1) {
                Update();
            }
};

我正在尝试通过从侦听器的onAdEnd方法调用Update方法来更新用户的钱包,但即使用户关闭了广告,它也会更新钱包。

我第一次尝试丛林,也搜索了很多,但没有得到我的答案。对此有任何帮助表示赞赏。谢谢!..

2 个答案:

答案 0 :(得分:1)

我是Gabor,是@Vungle的Intergation Engineer。

您可以在此处查看我们的文档,了解如何使用事件监听器。 https://support.vungle.com/hc/en-us/articles/204463100-Advanced-Settings-for-Vungle-Android-SDK

以上推荐的onVideoView()已被删除,您应该使用

@Override
    public void onAdEnd(boolean wasSuccessfulView, boolean wasCallToActionClicked) {
        // Called when the user leaves the ad and control is returned to your application        
        // if wasSuccessfulView is true, the user watched the ad and should be rewarded        
        // (if this was a rewarded ad).
        // if wasCallToActionClicked is true, the user clicked the call to action
        // button in the ad.
    }

如果广告完全由用户提供,则isSuccessfulView布尔值将为true。

如果您有更多问题,请随时通过tech-support@vungle.com与我们联系,我们将为您提供帮助。

的Gabor

答案 1 :(得分:0)

试试这个

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button class="click">Click Me</button>
<br>
<p class="extract" style="display:none;">Extracting html</p>
<input type="text" class="title">
<br>
<textarea name="" id="" cols="30" rows="5" class="description"></textarea>
<br>
<input type="text" class="image">

活动清单

    VunglePub vunglePub = VunglePub.getInstance();
    vunglePub.setEventListeners(vungleEventListener);