This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AdLoader { | |
/** | |
* Call this method to load Native ad | |
* @param context : Activity Context | |
* @param customAdListener : Custom Ad Listener to get - ad loaded, clicked, impression, failed callback | |
* @param adType : Custom Class for different type of Ad Formats - Banner, Native, Interstitial | |
* @param adapterHelper : AdapterHelper from MoPub | |
* @param moPubNativeEventListener : MoPub specific class to track impression & click | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AdFullLoader : MoPubInterstitial.InterstitialAdListener, InterstitialAdListener { | |
private var interstitialAd: InterstitialAd? = null | |
private var interstitialAdMoPub: MoPubInterstitial? = null | |
fun loadAds( | |
activity: Activity, | |
adUnitId: String, | |
isUseMediation: Boolean | |
) { | |
if (isUseMediation) { | |
if (interstitialAdMoPub == null) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/native_outer_view" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="?android:windowBackground" | |
android:padding="10dp" | |
android:textDirection="locale"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/native_outer_view" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="?android:windowBackground" | |
android:padding="10dp" | |
android:textDirection="locale"> |