/*
package com.colorful.keyboard.theme.myutil;

import android.content.Context;
import android.util.Log;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;
import androidx.lifecycle.ProcessLifecycleOwner;

import com.applovin.mediation.MaxAd;
import com.applovin.mediation.MaxAdListener;
import com.applovin.mediation.MaxError;
import com.applovin.mediation.ads.MaxAppOpenAd;

public class MaxAdInputManager implements LifecycleObserver, MaxAdListener {
    private MaxAppOpenAd appOpenAd;

    AdInputListener adListener;
    public MaxAdInputManager(Context context, String id, AdInputListener adLoadedListener) {
        Log.e("666","MaxAdManager");
        ProcessLifecycleOwner.get().getLifecycle().addObserver(this);
        Log.e("666","MaxAdManager02");
        this.adListener = adLoadedListener;
        appOpenAd = new MaxAppOpenAd(id, context);
        appOpenAd.setListener(this);
        appOpenAd.loadAd();
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    public void onStart() {
        //showAdIfReady();
    }

    @Override
    public void onAdLoaded(final MaxAd ad) {
        Log.e("666","onAdLoaded");
        adListener.adShow();
        appOpenAd.showAd();
    }

    @Override
    public void onAdLoadFailed(final String adUnitId, final MaxError error) {
        Log.e("666","onAdLoadFailed");
    }

    @Override
    public void onAdDisplayed(final MaxAd ad) {
        Log.e("666","onAdDisplayed");
    }

    @Override
    public void onAdClicked(final MaxAd ad) {
        Log.e("666","onAdClicked");
    }

    @Override
    public void onAdHidden(final MaxAd ad) {
        adListener.adClose();
        // appOpenAd.loadAd();
        Log.e("666","onAdHidden");
    }

    @Override
    public void onAdDisplayFailed(final MaxAd ad, final MaxError error) {
        appOpenAd.loadAd();
    }
}
*/
