How to integrate adwhirl code into android application
===

i want to integrate admob code inside my test app, here are the steps i have followed.

Layout file looks like this

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:gravity="bottom"
            android:id="@+id/layout_ad">
         
    </LinearLayout>

Manifest file looks like this

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="dummy.ads.packag"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />
        <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".Dummyads2Activity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

And finally here how the code looks

public class Dummyads2Activity extends Activity {//implements AdWhirlInterface{
    /** Called when the activity is first created. */
	
	private AdWhirlLayout adWhirlLayout;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        
       try{
            AdManager.setTestDevices( new String[] { AdManager.TEST_EMULATOR } );
            LinearLayout layout = (LinearLayout)findViewById(R.id.layout_ad);
            AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this, "my adwhirl id");
            Display d = this.getWindowManager().getDefaultDisplay();
            RelativeLayout.LayoutParams adWhirlLayoutParams = new RelativeLayout.LayoutParams(d.getWidth(), 72);
            layout.addView(adWhirlLayout, adWhirlLayoutParams);
        }catch(Exception e){
            //Log.e(TAG, "Unable to create AdWhirlLayout", e);
        }

    }

If i do like this, my app crashes, and no ads appear. Kindly help me in solving the problem.

