Tag Archives: ad mixer

Ad Mixer (II) – How to mix Quattro Wireless Ads, AdMob Ads, and your own clickable Ads

What an impressive long blog title!
Quattro Wireless Ads has slightly better eCPM than AdMob, and it allows your to put a default image Ads (not clickable). However, its fillrate is unbearably low (50% ~ 90%, typically around 75%, according to my 2 week test). Here, I’m showing you a way to mix Ads from Quattro Wireless, AdMob, and your own Ads.
For information about how to setup Ads on android apps using Quattro Wirelss, click here.
Step 1: Prepare your own banner ads.
Setp 2: Add the following Ads banner in your layout xml:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

<FrameLayout android:layout_width="fill_parent"
android:layout_height="50dp" android:gravity="top">
 
<ImageView android:id="@+id/ownads" android:src="@drawable/banner_ad"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
 
<com.admob.android.ads.AdView
android:id="@+id/adMob" android:layout_width="fill_parent"
android:layout_alignParentTop="true" android:layout_marginTop="10dp"
android:layout_height="fill_parent" />
 
<com.qwapi.adclient.android.view.QWAdView
android:id="@+id/QWAd" android:layout_width="fill_parent"
android:layout_height="fill_parent" qwad:siteId="xyz"
qwad:publisherId="xyz" qwad:mediaType="banner,text"
qwad:displayMode="autoRotate" qwad:placement="top"
qwad:animation="fade" />
</FrameLayout>

Step 3: Implement Quattro’s AdEventsListener …

Ad Mixer (I) – How to mix AdMob Ads and your own clickable Ads

If you are an AdMob publisher, you will know how fluctuating their fillrates are: mine varies from 40% to 100%. What’s even worse is that they don’t support default Ads. So I decide to mix in mine:
For information about how to setup Ads on android apps using AdMob, click here.
Step 1: Prepare your own banner ads (320×50 or 480×50. Note AdMob’s ads has a fixed height of 50 pixels).
Step 2: Replace your AdView with the following framelayout in your layout xml:

1
2
3
4
5
6
7
8
9
10
11
12

<FrameLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:gravity="center_horizontal">
 
<ImageView android:id="@+id/ownads" android:src="@drawable/banner_ad"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
 
<com.admob.android.ads.AdView android:id="@+id/ad"
android:layout_width="fill_parent" android:layout_height="50dp"
android:layout_alignParentBottom="true"
app:backgroundColor="#000000" app:textColor="#FFFFFF" />
</FrameLayout>

Step 3: Change your activity to include this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

private static final Uri SAME2D_URI =
Uri.parse("market://search?q=pname:com.clingmarks.same2dfree");
 
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) …