Hi all,
I'm trying to get Admob 4.1.0 to work but it ist really going well..
I've added the sdk to my project build path.
This is my main.xml:
<LinearLayout xmlns:android="
http://schemas.android.com/apk/res/
android"
xmlns:ads="
http://schemas.android.com/apk/lib/com.google.ads"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp"
>
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="my_code_will_be_here"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/>
<TabHost android:id="@+id/tabhost"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="110px">
<LinearLayout
android:id="@+id/tab1"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/btnSetTime"
android:text="button"></Button>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/tvDate"
android:text="TextView"></TextView><TextView android:text="TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/tvStart"></
TextView>
<TextView android:text="TextView" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/tvEnd"></
TextView><TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="TextView"
android:id="@+id/tvTotal"></TextView>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Break time:"
android:id="@+id/tvBreak"></TextView><EditText android:text="EditText"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@+id/tbBreakTime"></
EditText>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/btnSetBreakTime"
android:text="Set break time"></Button>
</LinearLayout>
<LinearLayout
android:id="@+id/tab2"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TableLayout xmlns:android="
http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="0,1,2,3"
android:id="@+id/maintable">
</TableLayout>
</ScrollView>
</LinearLayout>
<LinearLayout
android:id="@+id/tab3"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Selected
timesheet:" android:id="@+id/tvSelectedTimesheet"></TextView>
<Spinner android:id="@+id/Spinner01"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/
btnDeleteSelectedfile" android:text="Delete Selected timesheet"></
Button>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Create new
timesheet:" android:id="@+id/tvSetNewTimesheet"></TextView>
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@+id/tbTimesheet"
android:text=""></EditText>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/btnSave"
android:text="Save"></Button>
</LinearLayout>
</FrameLayout>
</TabHost>
</LinearLayout>
And this is my Manifest xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="
http://schemas.android.com/apk/res/android"
package="com.flitjes.Timesheet"
android:versionCode="3"
android:versionName="1.3">
<uses-sdk android:minSdkVersion="4" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:icon="@drawable/timesheet"
android:label="@string/app_name">
<activity android:name="com.Timesheet.Timesheet"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|
orientation"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
I've tried it this way:
http://blog.kerul.net/2011/05/installing-google-admob-into-android.html
It didn't work for me so i tried it like above and it isn't working
either.
Can any 1 tell me what i'm doing wrong?
Thanks in advance