Android Open Source - tapad-android-sdk Ad Request






From Project

Back to project page tapad-android-sdk.

License

The source code is released under:

MIT License

If you think the Android project tapad-android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.tapad.adserving;
/*ww  w . j a  va  2  s  .c  o m*/
/**
 * Encapsulates the request parameters needed to fetch an ad.
 */
public abstract class AdRequest {

    private String placementId;
    private boolean wrapWithHtml = false;
    private AdSize size;

    /**
     * Constructs a new AdRequest.
     *
     * @param placementId  the placement specific id assigned by Tapad / Swappit.
     * @param size         the requested ad dimensions
     * @param wrapWithHtml true if the markup should be wrapped with valid HTML document markup.
     *                     If false, only a HTML fragment will be returned.
     */
    public AdRequest(String placementId, AdSize size, boolean wrapWithHtml) {
        this.placementId = placementId;
        this.size = size;
        this.wrapWithHtml = wrapWithHtml;
    }

    public AdRequest(String placementId, AdSize size) {
        this(placementId, size, true);
    }

    public AdSize getSize() {
        return size;
    }

    public String getPlacementId() {
        return placementId;
    }

    public boolean isWrapWithHtml() {
        return wrapWithHtml;
    }

    protected abstract void onResponse(AdResponse response);

    @Override
    public String toString() {
        return "AdRequest[placementId=" + placementId + ", wrapWithHtml=" + wrapWithHtml + "]";
    }
}




Java Source Code List

com.tapad.adserving.AdRequestDispatcher.java
com.tapad.adserving.AdRequest.java
com.tapad.adserving.AdResource.java
com.tapad.adserving.AdResponse.java
com.tapad.adserving.AdServingServiceImpl.java
com.tapad.adserving.AdServingService.java
com.tapad.adserving.AdServing.java
com.tapad.adserving.AdSize.java
com.tapad.adserving.ui.AdView.java
com.tapad.sample.AdViewActivity.java
com.tapad.sample.MainActivity.java
com.tapad.sample.MainApplication.java
com.tapad.sample.ManualMarkupActivity.java
com.tapad.sample.SampleConstants.java
com.tapad.tracking.DeviceIdentifier.java
com.tapad.tracking.DeviceInfo.java
com.tapad.tracking.EventDispatcher.java
com.tapad.tracking.EventResource.java
com.tapad.tracking.Event.java
com.tapad.tracking.InstallReferrerReceiver.java
com.tapad.tracking.TrackingServiceImpl.java
com.tapad.tracking.TrackingService.java
com.tapad.tracking.Tracking.java
com.tapad.tracking.deviceidentification.AndroidId.java
com.tapad.tracking.deviceidentification.IdentifierSourceAggregator.java
com.tapad.tracking.deviceidentification.IdentifierSource.java
com.tapad.tracking.deviceidentification.PhoneId.java
com.tapad.tracking.deviceidentification.TypedIdentifier.java
com.tapad.tracking.deviceidentification.WifiMac.java
com.tapad.util.DigestUtil.java
com.tapad.util.HttpClientUtil.java
com.tapad.util.IoUtil.java
com.tapad.util.Logging.java