Ad Mob

Fox

Active Member
Licensed User
Longtime User
Hello Guys i try to add AD Mob in an simple application ... but my problem is following i add this in manifest

<!-- *** For AdMob: manually added *** -->
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation"/>
</manifest>

and save the file with right click and read only (Schreibgeschützt) if i compile it then i get

Compiling code. 0.65
Using existing AndroidManifest.xml.
(File is read-only.)
AndroidManifest-Example.xml file will be created instead.

so the program use the AndroidManifest-Example.xml and not my AndroidManifest.xml

what can i do?!
 

NJDude

Expert
Licensed User
Longtime User
No, your app will be using AndroidManifest.xml, the system is letting you know that since it's READ ONLY a copy will be created.

If you have B4A 1.7 you don't need to set the XML as Read Only, on the designer, click on the menu bar and then click Project -> Do Not overwrite manifest file
 
Upvote 0

Fox

Active Member
Licensed User
Longtime User
No, your app will be using AndroidManifest.xml, the system is letting you know that since it's READ ONLY a copy will be created.

If you have B4A 1.7 you don't need to set the XML as Read Only, on the designer, click on the menu bar and then click Project -> Do Not overwrite manifest file

yes but if i create it.. then i get an message like you must AdActivity Declare in your androidManifest.xml file... in my app but i have declare it... here is the manifest file:

<?xml version="1.0" encoding="UTF-8"?>
-<manifest android:installLocation="internalOnly" android:versionName="1.1" android:versionCode="1" package="package.name.name" xmlns:android="http://schemas.android.com/apk/res/android"> <uses-sdk android:minSdkVersion="4"/> <supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true"/> -<application android:label="Box" android:icon="@drawable/icon"> -<activity android:label="Box" android:screenOrientation="portrait" android:name=".main" android:launchMode="singleTop" android:windowSoftInputMode="stateHidden"> -<intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <activity android:label="About" android:screenOrientation="portrait" android:name="about" android:launchMode="singleTop" android:windowSoftInputMode="stateHidden"/>
<!-- *** For AdMob: manually added *** -->
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation"/> <<< here is the line for the ad mob

I use the tutorial from klaus / Translated and do all what there was written...
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
That means you have the latest AdMod SDK, you need to replace that line with this one:
B4X:
<!-- *** For AdMob: manually added *** -->
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|smallestScreenSize|screenSize"/>
 
Upvote 0
Top