Hello,
i run into an Error with the ti.admob module Version 2.0.1.
Titanium SDK: 2.1.0 GA Platform: Android, Android emulator Host Operatin System: OSX Lion
My App starts fine but my admob-banner shows up this message:
You must have AdActivity declared in AndroidManifest.xml with configChanges
I start my admob with following code
if(isAndroid) { // AdMob var Admob = require('ti.admob'); // then create an adMob view var adMobView = Admob.createView({ publisherId:"a1502a2cxxxxxx", testing:false, // default is false //top: 10, //optional //left: 0, // optional //right: 0, // optional bottom: 0, // optional //height: 450, //width: 75, adBackgroundColor:"FF8855", // optional backgroundColorTop: "738000", //optional - Gradient background color at top borderColor: "#000000", // optional - Border color textColor: "#000000", // optional - Text color urlColor: "#00FF00", // optional - URL color linkColor: "#0000FF" //optional - Link text color //primaryTextColor: "blue", // deprecated -- now maps to textColor //secondaryTextColor: "green" // deprecated -- now maps to linkColor }); //listener for adReceived adMobView.addEventListener(Admob.AD_RECEIVED,function(){ // alert("ad received"); Ti.API.info("ad received"); }); //listener for adNotReceived adMobView.addEventListener(Admob.AD_NOT_RECEIVED,function(){ //alert("ad not received"); Ti.API.info("ad not received"); }); //adMobView.requestAd(); //adMobView.requestTestAd(); win1.add(adMobView); }
My tiapp.xml looks like
<android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <supports-screens android:anyDensity="false"/> <activity android:configChanges="keyboardHidden|orientation" android:launchMode="singleTask" android:name="ti.modules.titanium.map.TiMapActivity" android:screenOrientation="portrait"/> <uses-library android:name="com.google.android.maps"/> <uses-library android:name="com.google.ads.AdActivity"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/> </manifest> </android> <mobileweb> <precache/> <splash> <enabled>true</enabled> <inline-css-images>true</inline-css-images> </splash> <theme>default</theme> </mobileweb> <modules> <module version="2.0.1">ti.admob</module> <!-- <module version="1.0" platform="android">ti.admob</module>--> <!--<module version="2.0">ti.admob</module>--> </modules>and my timodule.xml looks like
<?xml version="1.0" encoding="UTF-8"?> <ti:module xmlns:ti="http://ti.appcelerator.org" xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Similar to tiapp.xml, but contains module/platform specific configuration in <iphone> and <android> sections --> <iphone> </iphone> <android xmlns:android="http://schemas.android.com/apk/res/android"> <tool-api-level>14</tool-api-level> <manifest> <application> <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboardHidden|orientation"/> </application> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> </manifest> </android> </ti:module>Have anybody a solution for this?
Cheers Fab