Hi
On 2012.04.25 02:03, motz wrote:
I searched high and low for admob integration with mono for android. I found
Greg's post:
http://www.gregshackles.com/2011/02/using-admob-in-a-monodroid-application/
http://www.gregshackles.com/2011/02/using-admob-in-a-monodroid-application/
, however even the sample does not work anymore. It seems like Admob is now
on v6 and everything out there is only referencing v4.x. Anyone else trying
to do this?
Just few days ago did AdMobSample from samples:
Few things:
* set BuildAction for jar file to AndroidJavaLibrary (mine was none)
* set PublisherID in AndroidManifest.xml
Good post about JNI and VS
http://manski.net/2012/03/30/accessing-java-classes-from-mono-for-android-via-jni/
This should make AdMobSample compile and deploy.
Mainfest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="internalOnly" package="samples.admobtest">
<application>
<meta-data android:value="your-key" android:name="ADMOB_PUBLISHER_ID" />
<activity android:name="com.admob.android.ads.AdMobActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboard|keyboardHidden" />
<receiver android:name="com.admob.android.ads.analytics.InstallReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
</application>
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="13" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
Main.axml
<?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">
<com.admob.android.ads.AdView
android:id="@+id/Ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/RefreshAd"
android:text="Refresh ad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
regards
mel
Thanks,
James
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Admob-Binding-tp5663590p5663590.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
--
Miljenko Cvjetko dipl.ing. ET
Direktor/CEO
Projektant rjes(enja/Solution Architect
Razvojni programer/Senior developer
Voditelj projekta/Project Manager
IX juz(na obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: [email protected]
w: http://www.holisticware.net
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid