Skip to content

Instantly share code, notes, and snippets.

avocarrotCustom = new AvocarrotCustom(this, BuildConfig.AvocarrotApiKey, BuildConfig.PLACEMENT_CUSTOM);
avocarrotCustom.setSandbox(BuildConfig.SANDBOX);
avocarrotCustom.setLogger(true, "ALL");
avocarrotCustom.setListener(new AvocarrotCustomListener() {
@Override
public void onAdLoaded(List<CustomModel> ads) {
super.onAdLoaded(ads);
if ((ads==null)||(ads.size()==0))
@tsiougkosn
tsiougkosn / Avocarrot Interstitial Close Reason
Created July 7, 2015 14:39
Avocarrot Interstitial Close Reason
AvocarrotInterstitial interstitial = new AvocarrotInterstitial(this, "api key", "Placement key");
interstitial.setSandbox(true);
interstitial.setLogger(true, "ALL");
interstitial.setListener(new AvocarrotInterstitialListener() {
boolean isClicked = false;
@Override
public void onAdDisplayed() {
@tsiougkosn
tsiougkosn / gist:8b11a1c2afa7971191d3
Last active August 29, 2015 14:23
Integrate Avocarrot RecyclerView
replace
recyclerView.setAdapter( new DanceAdapter(dances) );
with
AvocarrotInstreamRecyclerView avocarrotInstreamRecyclerView = new AvocarrotInstreamRecyclerView(new DanceAdapter(dances), this, "<appId>", "<placement>");
recyclerView.setAdapter( avocarrotInstreamRecyclerView );
@tsiougkosn
tsiougkosn / gist:05ebb0e6809f58f85e29
Created June 16, 2015 13:15
RecyclerView Example
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
RecyclerView recyclerView = new RecyclerView(this);
setContentView(recyclerView);
final String[] dances = new String[]{