I already know that I should create a block for each actvity of my application that I want to display ads, but I do not know how to modify the string.xml
(if any) after the first ad unit has already been added:
string.xml
( source code )
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">My Application</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string>
</resources>
I wonder if I'll have to add the other ad units to the string.xml
code, but not necessarily rename it to differentiate one from the other:
string.xml
(removed from here and modified by me) .
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">My Application</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string>
<string name="banner_ad_unit_id">ca-app-pub-1239402565465465/2363007813</string>
</resources>
Or if I happen to have to change the name:
string.xml
(removed from here and modified by me) .
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">My Application</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string>
<string name="banner_ad_unit_id_02">ca-app-pub-1239402565465465/2363007813</string>
</resources>
Links that may be useful:
link /