shaobojohn / adwhirl

Automatically exported from code.google.com/p/adwhirl
0 stars 0 forks source link

Adding madvertise Android SDK #265

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Dear AdWhirl-Team,

we would like to integrate the madvertise-SDK.
Please find the clone of the Android-SDK here:
http://code.google.com/r/johannesborchardt-madvertise-adwhirl-android/,
the clone of the mobile server here:
http://code.google.com/r/johannesborchardt-madvertise-adwhirl-servermobile/ 
and the clone of the website server here:
http://code.google.com/r/johannesborchardt-madvertise-adwhirl-serverwebsite/.

The current version of the madvertise-SDK can be found here:
https://github.com/madvertise/madvertise-android-sdk

Please let me know when there is anything else we need to know or did wrong at 
johannes.borchardt@googlemail.com

Kind regards
Johannes 

Original issue reported on code.google.com by johannes...@gmail.com on 21 Oct 2011 at 3:36

GoogleCodeExporter commented 9 years ago

Madvertise would be a great addition to adwhirl especially for european 
developers. 

Original comment by Souljah2k on 21 Oct 2011 at 5:49

GoogleCodeExporter commented 9 years ago
Hi,

I'd like to support the integration of madvertise into Adwhirl.

Thanks!

Original comment by richard....@gmail.com on 25 Oct 2011 at 8:07

GoogleCodeExporter commented 9 years ago
support for Adwhirl would be nice.

Cheers!

Original comment by janner1...@gmail.com on 26 Oct 2011 at 9:32

GoogleCodeExporter commented 9 years ago
I would also like to see madvertise in AdWhirl!

Original comment by KarinaHi...@googlemail.com on 25 Nov 2011 at 7:35

GoogleCodeExporter commented 9 years ago
Yes, please add madvertise! A good amount of my traffic is from Europe and they 
are the best network there! Thanks!

Original comment by scheller...@yahoo.de on 25 Nov 2011 at 8:19

GoogleCodeExporter commented 9 years ago
Please!

Original comment by el.lu...@gmail.com on 11 Jan 2012 at 1:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hello, I also vote AdWhirl integration, but at the moment I integrated it on 
Android using a custom event "MAdvertise" on the AdWhirl web console calling 
the function "adWhirlMAdvertise":

Class MyAdManager to initialize the ad calling initialize:

import com.adwhirl.AdWhirlLayout;
import com.adwhirl.AdWhirlLayout.AdWhirlInterface;
import com.adwhirl.AdWhirlManager;

public class MyAdManager implements AdWhirlInterface {

    Context ctx;
    AdWhirlLayout adWhirlLayout;

    public static void initialize(Activity ctx, int adId) {     
        AdWhirlLayout adWhirlLayout = (AdWhirlLayout) ctx.findViewById(adId);       
        MyAdManager myAdManager = new MyAdManager();

        myAdManager.setCtx(ctx);
        myAdManager.setAdWhirlLayout(adWhirlLayout);

        adWhirlLayout.setAdWhirlInterface(myAdManager);
    }

    public Context getCtx() {
        return ctx;
    }

    public void setCtx(Context ctx) {
        this.ctx = ctx;
    }

    public AdWhirlLayout getAdWhirlLayout() {
        return adWhirlLayout;
    }

    public void setAdWhirlLayout(AdWhirlLayout adWhirlLayout) {
        this.adWhirlLayout = adWhirlLayout;
    }

    @Override
    public void adWhirlGeneric() {

    }

    public void adWhirlMAdvertise() {
        new MAdvertiseEvent(this);
    }
}

And the other class MAdvertiseEvent (I use a separated class to share 
MyAdManager between projects, some of them without the MAdvertise SDK):

import android.view.ViewGroup.LayoutParams;
import android.widget.RelativeLayout;
import de.madvertise.android.sdk.MadvertiseView;
import de.madvertise.android.sdk.MadvertiseView.MadvertiseViewCallbackListener;

public class MAdvertiseEvent implements MadvertiseViewCallbackListener {

    MyAdManager adManager;

    public MAdvertiseEvent(MyAdManager adManager) {
        this.adManager = adManager;

        MadvertiseView madvertiseView = new MadvertiseView(adManager.getCtx());
        madvertiseView.setMadvertiseViewCallbackListener(this);

        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT);

        adManager.getAdWhirlLayout().addView(madvertiseView, layoutParams);
    }

    @Override
    public void onLoaded(boolean succeed, MadvertiseView madView) {
        if (succeed) {
            adManager.getAdWhirlLayout().adWhirlManager.resetRollover();
            adManager.getAdWhirlLayout().rotateThreadedDelayed();
        } else {
            adManager.getAdWhirlLayout().rollover();
        }
    }

    @Override
    public void onError(Exception exception) {
        adManager.getAdWhirlLayout().rollover();
    }

    @Override
    public void onIllegalHttpStatusCode(int statusCode, String message) {
        adManager.getAdWhirlLayout().rollover();
    }
}

Original comment by alberto.ruibal@gmail.com on 21 Jan 2012 at 8:39

GoogleCodeExporter commented 9 years ago
Can anyone provide full instructions on how to integrate madvertise sdk using 
the adwhirl sdk etc. ?

Original comment by philiptr...@gmail.com on 1 Mar 2013 at 1:23