Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
billyjoker opened this issue Nov 22, 2018 · 0 comments
Open

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

billyjoker opened this issue Nov 22, 2018 · 0 comments
Assignees

Comments

@billyjoker
Copy link

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!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants