Android Open Source - snakk-ads-android-sample-app T V A S T Companion Ad






From Project

Back to project page snakk-ads-android-sample-app.

License

The source code is released under:

Copyright (c) 2012, Snakk! Media Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...

If you think the Android project snakk-ads-android-sample-app 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.snakk.vastsdk;
//from w w  w  .  java2 s . c  om
import android.os.Parcel;
import android.os.Parcelable;

import java.util.HashMap;

public class TVASTCompanionAd implements Parcelable {

    private String mCompId;
    private int mWidth;
    private int mHeight;
    private int mExpandedWidth;
    private int mExpandedHeight;
    private int mAssetWidth;
    private int mAssetHeight;
    private String mAPIFramework;
    private String mAdSlotId;
    private String mURIStaticResource;
    private String mTypeStaticResource;
    private String mURIIFrameResource;
    private String mDataHTMLResource;
    private String mAdParams;
    private boolean mAdParamsEncoded;
    private String mAltText;
    private HashMap<String, String> mTrackingEvents;
    private String mClickThrough;
    private String mClickTracking;
    private String mClickTrackingId;
    private boolean mRequired;

    public String getCompId() {
        return mCompId;
    }

    protected void setCompId(String compId) {
        mCompId = compId;
    }

    public int getWidth() {
        return mWidth;
    }

    protected void setWidth(int width) {
        mWidth = width;
    }

    public int getHeight() {
        return mHeight;
    }

    protected void setHeight(int height) {
        mHeight = height;
    }

    public int getExpandedWidth() {
        return mExpandedWidth;
    }

    protected void setExpandedWidth(int width) {
        mExpandedWidth = width;
    }

    public int getExpandedHeight() {
        return mExpandedHeight;
    }

    protected void setExpandedHeight(int height) {
        mExpandedHeight = height;
    }

    public int getAssetWidth() {
        return mAssetWidth;
    }

    protected void setAssetWidth(int width) {
        mAssetWidth = width;
    }

    public int getAssetHeight() {
        return mAssetHeight;
    }

    protected void setAssetHeight(int height) {
        mAssetHeight = height;
    }

    public String getAPIFramework() {
        return mAPIFramework;
    }

    protected void setAPIFramework(String apiFramework) {
        mAPIFramework = apiFramework;
    }

    public String getAdSlotId() {
        return mAdSlotId;
    }

    protected void setAdSlotId(String adSlotId) {
        mAdSlotId = adSlotId;
    }

    public String getURIStaticResource() {
        return mURIStaticResource;
    }

    protected void setURIStaticResource(String uriStaticResource) {
        mURIStaticResource = uriStaticResource;
    }

    public String getTypeStaticResource() {
        return mTypeStaticResource;
    }

    protected void setTypeStaticResource(String typeStaticResource) {
        mTypeStaticResource = typeStaticResource;
    }

    public String getURIIFrameResource() {
        return mURIIFrameResource;
    }

    protected void setURIIFrameResource(String uriIFrameResource) {
        mURIIFrameResource = uriIFrameResource;
    }

    public String getDataHTMLResource() {
        return mDataHTMLResource;
    }

    protected void setDataHTMLResource(String dataHTMLResource) {
        mDataHTMLResource = dataHTMLResource;
    }

    public String getAdParams() {
        return mAdParams;
    }

    protected void setAdParams(String adParams) {
        mAdParams = adParams;
    }

    public boolean getAdParamsEncoded() {
        return mAdParamsEncoded;
    }

    protected void setAdParamsEncoded(boolean adParamsEncoded) {
        mAdParamsEncoded = adParamsEncoded;
    }

    public String getAltText() {
        return mAltText;
    }

    protected void setAltText(String altText) {
        mAltText = altText;
    }

    public HashMap<String, String> getTrackingEvents() {
        return mTrackingEvents;
    }

    protected void setTrackingEvents(HashMap<String, String> trackingEvents) {
        mTrackingEvents = trackingEvents;
    }

    public String getClickThrough() {
        return mClickThrough;
    }

    protected void setClickThrough(String clickThrough) {
        mClickThrough = clickThrough;
    }

    public String getClickTracking() {
        return mClickTracking;
    }

    protected void setClickTracking(String clickTracking) {
        mClickTracking = clickTracking;
    }

    public String getClickTrackingId() {
        return mClickTrackingId;
    }

    protected void setClickTrackingId(String clickTrackingId) {
        mClickTrackingId = clickTrackingId;
    }

    public boolean getIsRequired() {
        return mRequired;
    }

    protected void setIsRequired(boolean isRequired) {
        mRequired = isRequired;
    }

    public TVASTCompanionAd() {
        mCompId = null;
        mAPIFramework = null;
        mAdSlotId = null;
        mURIStaticResource = null;
        mTypeStaticResource = null;
        mURIIFrameResource = null;
        mDataHTMLResource = null;
        mAdParams = null;
        mAltText = null;
        mTrackingEvents = null;
        mClickThrough = null;
        mClickTracking = null;
        mClickTrackingId = null;
    }


    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((mCompId == null) ? 0 : mCompId.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        TVASTCompanionAd other = (TVASTCompanionAd) obj;
        if (mCompId == null) {
            if (other.mCompId != null)
                return false;
        } else if (!mCompId.equals(other.mCompId))
            return false;
        return true;
    }

    public static final Creator<TVASTCompanionAd> CREATOR = new Creator<TVASTCompanionAd>() {

        @Override
        public TVASTCompanionAd[] newArray(int size) {
            return new TVASTCompanionAd[size];
        }

        @Override
        public TVASTCompanionAd createFromParcel(Parcel source) {
            TVASTCompanionAd companion = new TVASTCompanionAd();
            companion.mCompId = source.readString();
            companion.mWidth = source.readInt();
            companion.mHeight = source.readInt();
            companion.mExpandedWidth = source.readInt();
            companion.mExpandedHeight = source.readInt();
            companion.mAssetWidth = source.readInt();
            companion.mAssetHeight = source.readInt();
            companion.mAPIFramework = source.readString();
            companion.mAdSlotId = source.readString();
            companion.mURIStaticResource = source.readString();
            companion.mTypeStaticResource = source.readString();
            companion.mURIIFrameResource = source.readString();
            companion.mDataHTMLResource = source.readString();
            companion.mAdParams = source.readString();
            companion.mAdParamsEncoded = source.readInt() == 1;
            companion.mAltText = source.readString();
            companion.mTrackingEvents = new HashMap<String, String>();
            int size = source.readInt();
            for (int i = 0; i < size; i++) {
                String key = source.readString();
                String value = source.readString();
                companion.mTrackingEvents.put(key, value);
            }
            companion.mClickThrough = source.readString();
            companion.mClickTracking = source.readString();
            companion.mClickTrackingId = source.readString();
            companion.mRequired = source.readInt() == 1;
            return companion;
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(mCompId);
        dest.writeInt(mWidth);
        dest.writeInt(mHeight);
        dest.writeInt(mExpandedWidth);
        dest.writeInt(mExpandedHeight);
        dest.writeInt(mAssetWidth);
        dest.writeInt(mAssetHeight);
        dest.writeString(mAPIFramework);
        dest.writeString(mAdSlotId);
        dest.writeString(mURIStaticResource);
        dest.writeString(mTypeStaticResource);
        dest.writeString(mURIIFrameResource);
        dest.writeString(mDataHTMLResource);
        dest.writeString(mAdParams);
        dest.writeInt(mAdParamsEncoded ? 1 : 0);
        dest.writeString(mAltText);
        dest.writeInt(mTrackingEvents.size());
        for (String key : mTrackingEvents.keySet()) {
            dest.writeString(key);
            dest.writeString(mTrackingEvents.get(key));
        }
        dest.writeString(mClickThrough);
        dest.writeString(mClickTracking);
        dest.writeString(mClickTrackingId);
        dest.writeInt(mRequired ? 1 : 0);
    }
}




Java Source Code List

com.snakk.advertising.Config.java
com.snakk.advertising.SnakkAdPrompt.java
com.snakk.advertising.SnakkAdRequest.java
com.snakk.advertising.SnakkAdvertising.java
com.snakk.advertising.SnakkBannerAdView.java
com.snakk.advertising.SnakkInterstitialAd.java
com.snakk.advertising.SnakkVideoInterstitialAd.java
com.snakk.advertising.internal.AbstractStatefulAd.java
com.snakk.advertising.internal.AdActivityContentWrapper.java
com.snakk.advertising.internal.AdPromptImpl.java
com.snakk.advertising.internal.AdRequestImpl.java
com.snakk.advertising.internal.BasicWebView.java
com.snakk.advertising.internal.DeviceCapabilities.java
com.snakk.advertising.internal.InterstitialAdImpl.java
com.snakk.advertising.internal.InterstitialBaseView.java
com.snakk.advertising.internal.Sharable.java
com.snakk.advertising.internal.SnakkAdActivity.java
com.snakk.advertising.internal.VastPlayerView.java
com.snakk.advertising.internal.VideoInterstitialAdImpl.java
com.snakk.advertising.package-info.java
com.snakk.adview.AdFullscreenView.java
com.snakk.adview.AdInterstitialBaseView.java
com.snakk.adview.AdInterstitialView.java
com.snakk.adview.AdLog.java
com.snakk.adview.AdOfferWallView.java
com.snakk.adview.AdPrompt.java
com.snakk.adview.AdRequest.java
com.snakk.adview.AdVideoUnitView.java
com.snakk.adview.AdViewCore.java
com.snakk.adview.AdView.java
com.snakk.adview.AutoDetectedParametersSet.java
com.snakk.adview.Base64.java
com.snakk.adview.DeprecatedInterstitialBaseView.java
com.snakk.adview.IMraidCommand.java
com.snakk.adview.LockedOrientationDialog.java
com.snakk.adview.MraidCommand.java
com.snakk.adview.Mraid.java
com.snakk.adview.OldAdActivity.java
com.snakk.adview.Rotate3dAnimation.java
com.snakk.adview.Utils.java
com.snakk.adview.track.EventTracker.java
com.snakk.adview.track.InstallTracker.java
com.snakk.adview.package-info.java
com.snakk.core.SnakkLog.java
com.snakk.vastsdk.TVASTAdErrorEvent.java
com.snakk.vastsdk.TVASTAdErrorListener.java
com.snakk.vastsdk.TVASTAdError.java
com.snakk.vastsdk.TVASTAdType.java
com.snakk.vastsdk.TVASTAdView.java
com.snakk.vastsdk.TVASTAd.java
com.snakk.vastsdk.TVASTAdsLoader.java
com.snakk.vastsdk.TVASTAdsRequest.java
com.snakk.vastsdk.TVASTCompanionAdSlot.java
com.snakk.vastsdk.TVASTCompanionAd.java
com.snakk.vastsdk.TVASTCreative.java
com.snakk.vastsdk.TVASTLinearAd.java
com.snakk.vastsdk.TVASTLinearIcon.java
com.snakk.vastsdk.TVASTMediaFile.java
com.snakk.vastsdk.TVASTNonlinearAd.java
com.snakk.vastsdk.TVASTPostbackTask.java
com.snakk.vastsdk.TVASTUtils.java
com.snakk.vastsdk.TVASTVideoAdsManager.java
com.snakk.vastsdk.player.TVASTPlayer.java
com.snakk.vastsdk.player.TVASTSharable.java
com.snakk.vastsdk.player.TVASTTrackingVideoView.java
com.snakk.vastsdk.player.TVASTVideoProgressThread.java
com.snakkads.tabsswipe.BannerAdPromptFragment.java
com.snakkads.tabsswipe.BannerInterstitialFragment.java
com.snakkads.tabsswipe.BannerRichMediaFragment.java
com.snakkads.tabsswipe.BannerStandardMediaFragment.java
com.snakkads.tabsswipe.BannerVideoFragment.java
com.snakkads.tabsswipe.MainActivity.java
com.snakkads.tabsswipe.SplashScreen.java
com.snakkads.tabsswipe.adapter.TabsPagerAdapter.java
com.yourcompany.AdMobActivity.java
com.yourcompany.SampleActivity.java