不工作adwhril样本 [英] adwhril sample not working

查看:249
本文介绍了不工作adwhril样本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能给我提供一个样本集成到adwhril试图android.I这个样本

can anyone provide me a sample for integrating adwhril into android.I tried this sample

http://paste2.org/p/2168910

我用同样的code作为一个替代矿的SDK关键,但我得到警告说

I used the same code as that one replacing the sdk key of mine But i am getting warnings saying

任何人都可以给我建议

更新code的建议,并得到了这个警告。

updated the code as suggested and got this warning

推荐答案

是啊,我也面临这个问题,以这种方式解决了

Yea, i have also faced this problem and solved in this way

添加这些,如果你不已经在你的menifest添加

Add those if you didn't already added in your menifest

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

在你的活动,你要显示的添加

In your activity where you want to show the add

<meta-data android:value="---- Your Key ----"
            android:name="ADWHIRL_KEY"/>

现在添加您使用的是添加提供程序的所有jar,您的广告抡网络。将它们添加到您的应用程序的libs文件夹,然后将它们添加到从库上他们建立通过右键单击路径。

Now add all the jar of the add provider you used, in your ad-whirl network. Add them to your app's libs folder and then add them to build path by right clicking on them from libs.

例如,如果你使用AdMob则AdMob的jar添加到库,并将其添加到构建路径。然后添加此行menifest因为这是需要显示来自AdMob的附加或单独使用的AdWhirl

For example if you use Admob then add admob's jar to libs and add it to build path. And then add this line to menifest as this is needed to show add from admob individually or by using adwhirl

<activity android:name="com.google.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" >
        </activity>

现在,您将看到的AdMob的补充道。

Now you will see the adds of admob.

感谢您

PS:我已经添加了全code。与图片

Ps: i have added the full code with image

Menifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.expadwhirl"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:value="2f120f401e9a40d0afa55557d3a3a58c"
                android:name="ADWHIRL_KEY"/>
        </activity>

        <activity android:name="com.google.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" >
        </activity>
    </application>

</manifest>

布局

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <com.adwhirl.AdWhirlLayout
        android:id="@+id/adwrl"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        />

</RelativeLayout>

活动

import android.app.Activity;
import android.os.Bundle;

import com.adwhirl.AdWhirlLayout;
import com.adwhirl.AdWhirlLayout.AdWhirlInterface;

public class MainActivity extends Activity implements AdWhirlInterface {

    AdWhirlLayout adwrl;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public void adWhirlGeneric() {
        // TODO Auto-generated method stub
    }
}

项目总体

这篇关于不工作adwhril样本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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