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.advertising;
/*www.java2s.com*/import java.util.List;
import java.util.Map;
/**
* Request object used to hold request configuration details. Use {@link Builder} to generate instances. *
*/publicinterface SnakkAdRequest {
staticenum PlacementType {
ALL("all"),
PRE_ROLL("pre-roll"),
MID_ROLL("mid-roll"),
POST_ROLL("post-roll");
privatefinal String name;
PlacementType(String name) {
this.name = name;
}
@Override
public String toString() {
return name;
}
}
public String getZone();
/**
* This property is specific to video interstitial ads.
* @return placement type for video ad request
*/public PlacementType getPlacementType();
public List<String> getKeywords();
publicboolean isTestMode();
publicboolean isLocationTrackingEnabled();
public Map<String, String> getCustomParameters();
/**
* Builder object used to generate customized {@link SnakkAdRequest} objects.
*
* <h3>Example Usage</h3>
* <pre>
* SnakkAdRequest.Builder builder = SnakkAdvertising.getPwAdRequestBuilder("YOUR_ZONE_ID")
* // enable test mode during development
* .setTestMode(true)
*
* // allow gps data to be used in ad request
* .setLocationTrackingEnabled(true)
*
* // add relevant keywords to improve ad relevance
* .setKeywords(listOfKeywords);
* SnakkAdRequest request = builder.getPwAdRequest();
* </pre>
*/publicstaticinterface Builder {
public SnakkAdRequest getPwAdRequest();
public String getZone();
public Map<String, String> getCustomParameters();
public Builder setCustomParameters(Map<String, String> customParameters);
publicboolean isLocationTrackingEnabled();
public Builder setLocationTrackingEnabled(boolean locationTrackingEnabled);
publicboolean isTestMode();
public Builder setTestMode(boolean testMode);
public List<String> getKeywords();
public Builder setKeywords(List<String> keywords);
public PlacementType getPlacementType();
public Builder setPlacementType(PlacementType placementType);
}
}