触摸的AdWhirl拦截 [英] AdWhirl touch intercept

查看:252
本文介绍了触摸的AdWhirl拦截的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做出一个动作(递增计数器)当玩家接触到的AdWhirl旗帜广告。
我见过的的AdWhirl类有一个名为每个触摸方式:

I'd like to make an action (increment a counter) when a player touch the ad of the adwhirl banner. I've seen that the AdWhirl class have a method that is called every touch:

//We intercept clicks to provide raw metrics
    public boolean onInterceptTouchEvent(MotionEvent event) {  
            switch(event.getAction()) {
            //Sending on an ACTION_DOWN isn't 100% correct... user could have touched down and dragged out. Unlikely though.
            case MotionEvent.ACTION_DOWN:
                    Log.d(AdWhirlUtil.ADWHIRL, "Intercepted ACTION_DOWN event");
                    countClickThreaded();

                    if(activeRation.type == 9) {
                            Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(custom.link));
                            this.context.startActivity(intent);
                    }
                    break;
            }

            // Return false so subViews can process event normally.
            return false;
    }

好了,我该怎么使用呢?我应该实现一个监听器?或者,也许实现这样一个AdWhirlInterface一类? 处理的AdWhirl onFailure处

我真的不知道如何移动:(

I really don't know how to move :(

推荐答案

查看 adWhirlClickMetric 库的方法,看看当它被调用。每当用户触摸广告横幅(在SDK的iOS版本至少)和将是完美的你想要做的是什么所谓。

Check out the adWhirlClickMetric method of the library and see when it is called. It is called whenever a user touches an ad banner (in the iOS version of the SDK at least) and would be perfect for what you want to do.

这篇关于触摸的AdWhirl拦截的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆