简体   繁体   English

Android admob和Adwhirl集成

[英]Android admob and Adwhirl integration

I am trying to add addwhirl in my app but I doesnt show up any ads, I am doing following things 我正在尝试在我的应用中添加addwhirl,但是我没有展示任何广告,我在做以下事情

Manifest.xml 的Manifest.xml

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Layout.xml Layout.xml

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/com.liverpool.activities"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:id="@+id/layout_ad" />

in code I am doing following 在代码中我正在关注

try
    {
        AdManager.setTestDevices(new String[] { AdManager.TEST_EMULATOR });
        LinearLayout layout = (LinearLayout) findViewById(R.id.layout_ad);
        AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this, "SDK key from adwhirl");
        Display d = this.getWindowManager().getDefaultDisplay();
        RelativeLayout.LayoutParams adWhirlLayoutParams = new RelativeLayout.LayoutParams(d.getWidth(), 72);
        layout.addView(adWhirlLayout, adWhirlLayoutParams);
    }
    catch (Exception e)
    {
    }

where I am doing wrong? 我在哪里做错了?

Remember you only really need the INTERNET permission. 请记住,您只真正需要INTERNET权限。 The rest is optional. 其余的是可选的。 You shouldn't ask for GPS location unless your app needs it. 除非您的应用需要,否则您不应该询问GPS位置。 If you do it just for the ads you'll get negative reactions from your users. 如果您仅针对广告这样做,就会受到用户的负面反应。 And trust me adding more geo targeting will not increase your revenue. 并且相信我,添加更多的地理位置定位不会增加您的收入。

There is nothing wrong with the above code. 上面的代码没有错。

Problem is that I haven't configured the adwhirl page with ads provider settings its very fool to miss such thing 问题是我还没有为adwhirl页面配置广告提供商设置,所以很容易错过这种事情

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM