Millennial Media Generic Notification with Android

12 views
Skip to first unread message

greg85

unread,
Apr 27, 2010, 7:39:15 PM4/27/10
to AdWhirl Users
I am trying to implement the Android SDK with Millennial Media and
since right now there is only code to support Admob and Quattro, I
believe I need to use the Generic notification function.

I think I have done this correctly however the Millennial Media SDK
seems so thin - I have no idea how to tell if an ad was returned in
code to determine if I need to call the rollover method which makes
AdWhirl as a mediation layer pointless. I have tried every type of
"getxxx" or "isxxx" View method I could find but nothing seems to
determine if an ad is on the screen and they don't seem to have an
onAdFailed or similar callback.

I am assuming people have done this before so what is the best way? I
want Millennial as my number 1 and Quattro as number 2 because of
Millennial's high eCPM but they have terrible fill rates (like 60% for
me...)


Thanks!
-Greg

Joe Langley

unread,
Apr 27, 2010, 8:13:34 PM4/27/10
to adwhir...@googlegroups.com
I hear you. I do exactly the same thing. Very unhappy though with fill rate of MM...some days I am closer to 30%....they do pay highest though. The code below should work for you. One thing is that the ads that come in from MM are padded, so some tweaks with layout had to be done.

private static void appendAdWhirl(final Activity activity, int id) {
LinearLayout layout = (LinearLayout)activity.findViewById(id);
final AdWhirlLayout adWhirlLayout = new AdWhirlLayout(activity, "ADWHIRLIDHERE");
adWhirlLayout.setAdWhirlInterface(new AdWhirlInterface() {
@Override
public void adWhirlGeneric() {
// My APID supplied by developer.millennialmedia.com
final String MYAPID = "MILLENNIALIDHERE";

   LinearLayout myLayout = new LinearLayout(activity);
   myLayout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    
                            //MM SDK shows other things you can send to them as well  
   Hashtable<String, String> map = new Hashtable<String, String>();
   map.put("keywords", "SOMEKEYWORDS");
                           //set to 0 since you will use refresh timer on adwhirl
   MMAdView adview = new MMAdView(activity, MYAPID, 0, map);
adview.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
myLayout.addView(adview);
adview.setVerticalScrollBarEnabled(false);
adview.setHorizontalScrollBarEnabled(false);

adWhirlLayout.pushSubView(myLayout);
}
});
RelativeLayout.LayoutParams adWhirlLayoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, 51);
layout.addView(adWhirlLayout, adWhirlLayoutParams);
layout.invalidate();

greg85

unread,
Apr 27, 2010, 8:32:06 PM4/27/10
to AdWhirl Users
Joe,

Thanks for you quick response. So far your code is almost identical
to mine except for some layout parameter stuff. I still don't see how
this works though. Where is the logic that calls the rollover method
if Millennial ad fails to return? Maybe I am misunderstanding
something...

Thanks,
-Greg

Joe Langley

unread,
Apr 27, 2010, 8:41:03 PM4/27/10
to adwhir...@googlegroups.com
Hmmm... if that is the case, I am missing something as well. Justin, can you chime in?

greg85

unread,
Apr 27, 2010, 8:46:10 PM4/27/10
to AdWhirl Users
I have an email out to Millennial as well if Justin isn't sure to see
what can be done because I know for a fact that somehow a status can
be returned. I used to use Mobclix which regularly made calls to
Quattro when a Millennial ad failed.

On Apr 27, 8:41 pm, Joe Langley <maildroid...@gmail.com> wrote:
> Hmmm... if that is the case, I am missing something as well. Justin, can you
> chime in?
>

Justin Pincar

unread,
Apr 27, 2010, 8:48:16 PM4/27/10
to adwhir...@googlegroups.com
The current version of Millennial's SDK does not support any callbacks
on ad success or failure, and I'm not sure how MobClix handles that
limitation. In any case, we're working with Millennial to build an
AdWhirl adapter - which we expect to release in the near future.
`Justin

greg85

unread,
May 2, 2010, 11:17:51 AM5/2/10
to AdWhirl Users
Justin,

Interesting, good to know something is in the works. Do you have any
idea on a timeline? I just saw Millennial released an update to 2.5.1
on 4/22/10 with a very minor update to allow ad refresh time to be 30
seconds instead of 60. Anyway, obviously this is their issue and I
will be calling them but since you are working with them and they
haven't responded to my emails yet, do you have a rough estimate as to
when this new adapter feature will be released? A week? Several
weeks? Several months? This is killing my eCPM with a 60% fill
rate....


Thanks,
-Greg

On Apr 27, 8:48 pm, Justin Pincar <justinpin...@gmail.com> wrote:
> The current version of Millennial's SDK does not support any callbacks
> on ad success or failure, and I'm not sure how MobClix handles that
> limitation. In any case, we're working with Millennial to build an
> AdWhirl adapter - which we expect to release in the near future.
> `Justin
>
> On Tue, Apr 27, 2010 at 5:46 PM, greg85
>

Justin Pincar

unread,
May 3, 2010, 1:31:31 PM5/3/10
to adwhir...@googlegroups.com
Hi Greg,

The integration is still in progress so there's no set date, but I
don't think it would be more than a week or two until we're finished.

`Justin
Reply all
Reply to author
Forward
0 new messages