Skip to content

How to add properly a custom event with StartApp? #85

Description

@billyjoker

Hi, i've tried following the tutorial (made with Mopub) to do the same with StartApp, but i am not sure about doing well, because StartApp have no the Interstitial events that they supposed to have, so i've started coding with this (but i do not know how to use it or if it is fired automatically by MobFox, but anyway this class is never executed):

package com.mobfox.sdk.customevents;

import android.content.Context;
import android.util.Log;
import com.startapp.android.publish.ads.interstitials.InterstitialAd;
import com.startapp.android.publish.adsCommon.StartAppAd;
import java.util.Map;

public class StartAppInterstitial implements CustomEventInterstitial {

    private final String TAG = StartAppInterstitial.class.getSimpleName();
    InterstitialAd mInterstitialAd;
    StartAppInterstitial self;

    public StartAppInterstitial() {
        Log.d(TAG, "MobFox StartApp Custom >> constructor");
    }

    @Override
    public void loadInterstitial(Context context, CustomEventInterstitialListener customEventInterstitialListener,
                                 String networkId, Map<String, Object> params) {
        Log.d(TAG, "MobFox StartApp Custom >> loadInterstitial");
        self = this;

        StartAppAd.showAd(context); //this method loads and shows interstitial

        if (customEventInterstitialListener != null) {
            customEventInterstitialListener.onInterstitialLoaded(self);

        } else {
            Log.d(TAG, "MobFox StartApp Custom >> loadInterstitial customEventInterstitialListener was null");
        }

    }

    @Override
    public void showInterstitial() {

    }

    @Override
    public void setListener(CustomEventInterstitialListener customEventInterstitialListener) {

    }
}

So please i need some help with this!! Thanks!!

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions