Giter Site home page Giter Site logo

amirisback / frogo-admob Goto Github PK

View Code? Open in Web Editor NEW
92.0 5.0 24.0 3.33 MB

Library Helper For Implementation All Admob Function

Home Page: https://faisalamircs.medium.com/dapatkan-penghasilan-dari-aplikasi-androidmu-di-play-store-dengan-admob-helper-f21288de5071

License: Apache License 2.0

Kotlin 98.81% Java 1.19%
admob admob-demo admob-plugin android android-ko monetization playstore gms admob-helper adapter

frogo-admob's Introduction

ScreenShoot Apps

About This Project

Android Arsenal JitPack Android CI Scan with Detekt Medium Badge

  • Available on Google Dev Library - Click Here
  • Privacy Policy Click Here
  • LICENSE Click Here
  • Helper for activating admob
  • Example Source Code For Call Method Show Admob
  • Calling method on Inheritance Class
  • Implement all Admob Version
  • Jetpack Compose Function (Experimental)
  • Don't forget implement frogo-sdk Click Here

Note For Jitpack Build

  • Red : Failed (So don't use that version / Using previous version)
  • Green : Success / Pass (Use It)

ScreenShot Apps

Banner and Interstitial RecyclerView with Banner
User Messaging Platform Rewarded Apps

Version Release

$version_release = 5.3.7

// Suport Library
$admob_version = 23.0.0 // https://developers.google.com/admob/android/sdk
$unity_ad_version = 4.10.0 // https://developers.google.com/admob/android/mediation/unity#step_3_import_the_unity_ads_sdk_and_adapter

What's New??

* Enhance Performance *
* Refactoring Code *
* Update Admob Library Version 23.0.0 *
* Deprecated Code *

How To Use / Implement This Project

Step 1. Add the JitPack repository to your build file

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle`

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency

<Option 1> Groovy

dependencies {
    // library google admob (Required)
    implementation 'com.google.android.gms:play-services-ads:${admob_version}'

    // library unity ads (Required)
    implementation 'com.unity3d.ads:unity-ads:${unity_ad_version}'

    // library frogo-admob (Required - Recomended)
    implementation 'com.github.amirisback:frogo-admob:5.3.7'

    // -----------------------------------------------------------------------------------------
    // For Single Library Patch 

    // library frogo-admob (Admob Only)
    implementation 'com.github.amirisback.frogo-admob:ad-admob:5.3.7'

    // library frogo-admob (Unity Ads Only)
    implementation 'com.github.amirisback.frogo-admob:ad-unityad:5.3.7'
}

<Option 2> Kotlin DSL

dependencies {
    // library google admob (Required)
    implementation("com.google.android.gms:play-services-ads:${admob_version}")

    // library unity ads (Required)
    implementation("com.unity3d.ads:unity-ads:${unity_ad_version}")

    // library frogo-admob (Required - Recomended)
    implementation("com.github.amirisback:frogo-admob:5.3.7")

    // -----------------------------------------------------------------------------------------
    // For Single Library Patch

    // library frogo-admob (Admob Only)
    implementation("com.github.amirisback.frogo-admob:ad-admob:5.3.7")

    // library frogo-admob (Unity Ads Only)
    implementation("com.github.amirisback.frogo-admob:ad-unityad:5.3.7")

}

Step 3. Adding meta-data on AndroidManifest.xml

<manifest>
    <application>
        <!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    </application>
</manifest>

Step 4. Setup Admob and Showing Ads

XML

Click for detail!

Setup Ads Using Server

class <YourActivity> : FrogoAdActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        requestAdmobApi()
    }

    private fun requestAdmobApi() {
        val baseUrl = "https://raw.githubusercontent.com/amirisback/frogo-admob/master/app/src/main/assets/"
        val frogoAdmobRepository = FrogoAdmobRepository(baseUrl)
        frogoAdmobRepository.usingClient()
        frogoAdmobRepository.getFrogoAdmobId(
            "admob_id",
            object : FrogoAdmobApiResponse<FrogoAdmobId> {
                override fun onSuccess(data: FrogoAdmobId) {
                    runOnUiThread {
                        showLogDebug(data.appId)
                        showLogDebug(data.bannerID[0])
                        showLogDebug(data.interstitialID[0])
                        showLogDebug(data.testAdmobAppId)
                        showLogDebug(data.testAdmobBanner)
                        showLogDebug(data.testAdmobInterstitial)
                    }
                }

                override fun onFailed(statusCode: Int, errorMessage: String?) {
                    runOnUiThread {
                        showLogDebug(errorMessage)
                    }
                }

                override fun onShowProgress() {
                }

                override fun onHideProgress() {
                }
            })
    }

}

Showing Ads

class <YourActivity> : FrogoAdmobActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setupButtonClick()
        setupBannerAds()
    }

    ...
    ...
    ...

    private fun setupBannerAds() {
        showBanner(binding.adsXml.adsPhoneTabSpecialSmartBanner)
        showBannerContainer(
            getString(R.string.admob_banner),
            AdSize.SMART_BANNER,
            binding.includeAdsView.frogoAdsBanner
        )
    }

    private fun setupButtonClick() {

        binding.apply {

            btnInterstitial.setOnClickListener {

                // No Using Callback
                showAdInterstitial(getString(R.string.admob_interstitial))

                // With Callback
                showAdInterstitial(
                    getString(R.string.admob_interstitial),
                    object : IFrogoInterstitial {

                        override fun onAdDismissed(message: String) {
                            frogoStartActivity<MainActivity>()
                            finish()
                        }

                        override fun onAdFailedToLoad(errorMessage: String) {
                            frogoStartActivity<MainActivity>()
                            finish()
                        }

                        override fun onAdFailedToShow(errorMessage: String) {
                            frogoStartActivity<MainActivity>()
                            finish()
                        }

                        override fun onAdLoaded(message: String) {}

                        override fun onAdShowed(message: String) {}

                        override fun onAdNotReady(message: String) {
                            frogoStartActivity<MainActivity>()
                            finish()
                        }

                    }
                )

            }

            btnRewarded.setOnClickListener {
                showAdRewarded(getString(R.string.admob_rewarded), object : FrogoAdmobRewardedCallback {
                    override fun onUserEarnedReward(rewardItem: RewardItem) {
                        // TODO("User Get Reward")
                    }

                    override fun onAdClosed() {
                        // TODO("Not yet implemented")
                    }

                    override fun onAdFailedToLoad() {
                        // TODO("Not yet implemented")
                    }

                    override fun onAdFailedToShow() {
                        // TODO("Not yet implemented")
                    }

                    override fun onAdLoaded() {
                        // TODO("Not yet implemented")
                    }

                    override fun onAdNotReady(message: String) {
                        // TODO("Not yet implemented")
                    }
                })
            }

            btnRewardedInterstitial.setOnClickListener {
                showAdRewardedInterstitial(getString(R.string.admob_rewarded_interstitial),
                    object : FrogoAdmobRewardedCallback {
                        override fun onUserEarnedReward(rewardItem: RewardItem) {
                            // TODO("User Get Reward")
                        }

                        override fun onAdClosed() {
                            // TODO("Not yet implemented")
                        }

                        override fun onAdFailedToLoad() {
                            // TODO("Not yet implemented")
                        }

                        override fun onAdFailedToShow() {
                            // TODO("Not yet implemented")
                        }

                        override fun onAdLoaded() {
                            // TODO("Not yet implemented")
                        }

                        override fun onAdNotReady(message: String) {
                            // TODO("Not yet implemented")
                        }
                    })
            }

        }

    }

}

Jetpack Compose

Click for detail!

ComposeActivity

class ComposeActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            FrogoAdmobTheme {
                // A surface container using the 'background' color from the theme
                Surface(color = MaterialTheme.colors.background) {
                    Column {
                        FrogoAdmobBannerView(
                            mAdUnitID = getString(R.string.admob_banner),
                            mAdSize = adsize_banner
                        )
                    }
                }
            }
        }
    }
}

Hybrid (Jetpack Compose + XML)

Click for detail!

XML Layout

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".mvvm.main.MainActivity">

    <androidx.compose.ui.platform.ComposeView
        android:id="@+id/compose_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@id/include_ads_view"/>

    <include
        android:id="@+id/include_ads_view"
        layout="@layout/ads_phone_tab_special_smart_banner" />

</RelativeLayout>

Kotlin Class

class HybridActivity : BaseActivity<ActivityHybridBinding>() {

    override fun setupViewBinding(): ActivityHybridBinding {
        return ActivityHybridBinding.inflate(layoutInflater)
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding.apply {
            composeView.setContent {
                Greeting("FrogoAdmob")
            }

            setupShowAdsBanner(includeAdsView.adsPhoneTabSpecialSmartBanner)
        }

    }

    @Composable
    fun Greeting(name: String) {
        Text(text = "Hello $name!")
    }

}

Java Sample Implementation

  • You can follow sample below or go to Full Sample Code Full Code
Click for detail!

Setup Java BaseActivity

public abstract class <Your BaseJavaActivity> extends FrogoAdmobActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

}

Setup Your Activity

public class MainJavaActivity extends BaseJavaActivity {

    private ActivityMainBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityMainBinding.inflate(LayoutInflater.from(this));
        setContentView(binding.getRoot());
        showBanner(binding.includeAdsView.adsPhoneTabSpecialSmartBanner);
        hideButton();
        setupButtonClick();
    }

    ...
    ...
    ...

    private void setupButtonClick() {

        binding.btnInterstitial.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                showAdInterstitial(getString(R.string.admob_interstitial));
            }
        });

        binding.btnRewarded.setOnClickListener(view -> showAdRewarded(getString(R.string.admob_rewarded), new FrogoAdmobRewardedCallback() {
            @Override
            public void onUserEarnedReward(@NonNull RewardItem rewardItem) {

            }

            @Override
            public void onAdClosed() {

            }

            @Override
            public void onAdFailedToLoad() {

            }

            @Override
            public void onAdFailedToShow() {

            }

            @Override
            public void onAdLoaded() {

            }

            @Override
            public void onAdNotReady(@NonNull String message) {

            }
        }));

        binding.btnRewardedInterstitial.setOnClickListener(view -> showAdRewardedInterstitial(getString(R.string.admob_rewarded_interstitial), new FrogoAdmobRewardedCallback() {
            @Override
            public void onUserEarnedReward(@NonNull RewardItem rewardItem) {

            }

            @Override
            public void onAdClosed() {

            }

            @Override
            public void onAdFailedToLoad() {

            }

            @Override
            public void onAdFailedToShow() {

            }

            @Override
            public void onAdLoaded() {

            }

            @Override
            public void onAdNotReady(@NonNull String message) {

            }

        }));

    }

}

List Function FrogoAdmobActivity and FrogoSdkAdmobActivity

// Show Ad Consent
fun showAdConsent()

// ---------------------------------------------------------------------------------------------

// Show Banner Ads
fun showAdBanner(mAdView: AdView)

// Show Banner Ads with timeout millisecond
fun showAdBanner(mAdView: AdView, timeoutMilliSecond: Int)

// Show Banner Ads with keyword
fun showAdBanner(mAdView: AdView, keyword: List<String>)

// Show Banner Ads with timeout millisecond and keyword
fun showAdBanner(mAdView: AdView, timeoutMilliSecond: Int, keyword: List<String>)

// Show Banner Ads  with timeout millisecond and keyword and callback
fun showAdBanner(
    mAdView: AdView,
    timeoutMilliSecond: Int,
    keyword: List<String>,
    callback: FrogoAdmobBannerCallback
)

// Show Banner Ads with callback
fun showAdBanner(mAdView: AdView, callback: FrogoAdmobBannerCallback)

// Show Banner Ads  with timeout millisecond and callback
fun showAdBanner(mAdView: AdView, timeoutMilliSecond: Int, callback: FrogoAdmobBannerCallback)

// Show Banner Ads  with and keyword and callback
fun showAdBanner(mAdView: AdView, keyword: List<String>, callback: FrogoAdmobBannerCallback)

// ---------------------------------------------------------------------------------------------

// Show Banner Ads with container
fun showAdBannerContainer(
    bannerAdUnitId: String,
    mAdsSize: AdSize,
    container: RelativeLayout,
)

// Show Banner Ads with container and timeout millisecond
fun showAdBannerContainer(
    bannerAdUnitId: String,
    mAdsSize: AdSize,
    container: RelativeLayout,
    timeoutMilliSecond: Int,
)

// Show Banner Ads with container and keyword
fun showAdBannerContainer(
    bannerAdUnitId: String,
    mAdsSize: AdSize,
    container: RelativeLayout,
    keyword: List<String>,
)

// Show Banner Ads with container and keyword and timeout millisecond
fun showAdBannerContainer(
    bannerAdUnitId: String,
    mAdsSize: AdSize,
    container: RelativeLayout,
    timeoutMilliSecond: Int,
    keyword: List<String>
)

// Show Banner Ads with container and callback
fun showAdBannerContainer(
    bannerAdUnitId: String,
    mAdsSize: AdSize,
    container: RelativeLayout,
    callback: FrogoAdmobBannerCallback
)

// Show Banner Ads with container and timeout millisecond and callback
fun showAdBannerContainer(
    bannerAdUnitId: String,
    mAdsSize: AdSize,
    container: RelativeLayout,
    timeoutMilliSecond: Int,
    callback: FrogoAdmobBannerCallback
)

// Show Banner Ads with container and keyword and callback
fun showAdBannerContainer(
    bannerAdUnitId: String,
    mAdsSize: AdSize,
    container: RelativeLayout,
    keyword: List<String>,
    callback: FrogoAdmobBannerCallback
)

// Show Banner Ads with container and timeout millisecond and keyword and callback
fun showAdBannerContainer(
    bannerAdUnitId: String,
    mAdsSize: AdSize,
    container: RelativeLayout,
    timeoutMilliSecond: Int,
    keyword: List<String>,
    callback: FrogoAdmobBannerCallback
)

// ---------------------------------------------------------------------------------------------

// Show Interstitial Ads with timeout millisecond, keyword, callback
fun showAdInterstitial(
    interstitialAdUnitId: String,
    timeoutMilliSecond: Int,
    keyword: List<String>,
    callback: FrogoAdmobInterstitialCallback
)

// Show Interstitial Ads with timeout millisecond and keyword
fun showAdInterstitial(
    interstitialAdUnitId: String,
    timeoutMilliSecond: Int,
    keyword: List<String>
)

// Show Interstitial Ads with timeout millisecond
fun showAdInterstitial(
    interstitialAdUnitId: String,
    timeoutMilliSecond: Int
)

// Show Interstitial Ads with keyword
fun showAdInterstitial(
    interstitialAdUnitId: String,
    keyword: List<String>
)

// Show Interstitial Ads
fun showAdInterstitial(interstitialAdUnitId: String)

// Show Interstitial Ads with timeout milliSecond and callback
fun showAdInterstitial(
    interstitialAdUnitId: String,
    timeoutMilliSecond: Int,
    callback: FrogoAdmobInterstitialCallback
)

// Show Interstitial Ads with keyword and callback
fun showAdInterstitial(
    interstitialAdUnitId: String,
    keyword: List<String>,
    callback: FrogoAdmobInterstitialCallback
)

// Show Interstitial Ads with callback
fun showAdInterstitial(
    interstitialAdUnitId: String,
    callback: FrogoAdmobInterstitialCallback
)

// ---------------------------------------------------------------------------------------------

// Show Rewarded Ads
fun showAdRewarded(mAdUnitIdRewarded: String, callback: FrogoAdmobRewardedCallback)

// Show Rewarded Ads with timeout millisecond
fun showAdRewarded(
    mAdUnitIdRewarded: String,
    timeoutMilliSecond: Int,
    callback: FrogoAdmobRewardedCallback
)

// Show Rewarded Ads with keyword
fun showAdRewarded(
    mAdUnitIdRewarded: String,
    keyword: List<String>,
    callback: FrogoAdmobRewardedCallback
)

// Show Rewarded Ads with timeout millisecond and keyword
fun showAdRewarded(
    mAdUnitIdRewarded: String,
    timeoutMilliSecond: Int,
    keyword: List<String>,
    callback: FrogoAdmobRewardedCallback
)

// ---------------------------------------------------------------------------------------------

// Show Rewarded Interstitial Ads
fun showAdRewardedInterstitial(
    mAdUnitIdRewardedInterstitial: String,
    callback: FrogoAdmobRewardedCallback
)

// Show Rewarded Interstitial Ads with timeout millisecond
fun showAdRewardedInterstitial(
    mAdUnitIdRewardedInterstitial: String,
    timeoutMilliSecond: Int,
    callback: FrogoAdmobRewardedCallback
)

// Show Rewarded Interstitial Ads with keyword
fun showAdRewardedInterstitial(
    mAdUnitIdRewardedInterstitial: String,
    keyword: List<String>,
    callback: FrogoAdmobRewardedCallback
)

// Show Rewarded Interstitial Ads with timeout millisecond and keyword
fun showAdRewardedInterstitial(
    mAdUnitIdRewardedInterstitial: String,
    timeoutMilliSecond: Int,
    keyword: List<String>,
    callback: FrogoAdmobRewardedCallback
)

// ---------------------------------------------------------------------------------------------

// Unity Ads

fun setupUnityAdApp(
    testMode: Boolean,
    unityGameId: String
)

fun setupUnityAdApp(
    testMode: Boolean,
    unityGameId: String,
    callback: IFrogoUnityAdInitialization
)

fun showUnityAdInterstitial(
    adInterstitialUnitId: String
)

fun showUnityAdInterstitial(
    adInterstitialUnitId: String,
    callback: IFrogoUnityAdInterstitial
)

// ---------------------------------------------------------------------------------------------

fun showAdmobXUnityAdInterstitial(
    admobInterstitialId: String,
    unityInterstitialId: String,
    callback: IFrogoMixedAdsInterstitial
)

fun showUnityXAdmobAdInterstitial(
    admobInterstitialId: String,
    unityInterstitialId: String,
    callback: IFrogoMixedAdsInterstitial
)

Jetpack Compose Element

Variable

val adsize_banner: AdSize = AdSize.BANNER
val adsize_full_banner: AdSize = AdSize.FULL_BANNER
val adsize_large_banner: AdSize = AdSize.LARGE_BANNER
val adsize_smart_banner: AdSize = AdSize.SMART_BANNER
val adsize_medium_rectangle: AdSize = AdSize.MEDIUM_RECTANGLE
val adsize_wide_skycraper: AdSize = AdSize.WIDE_SKYSCRAPER

Function

@Composable
fun FrogoAdmobBannerView(
    mAdUnitID: String,
    mAdSize: AdSize,
    modifier: Modifier = Modifier
) {
    AndroidView(
        modifier = modifier.fillMaxWidth(),
        factory = { context ->
            showLogDebug("FrogoAdmobBannerView")
            AdView(context).apply {
                adSize = mAdSize
                adUnitId = mAdUnitID
                loadAd(AdRequest.Builder().build())
            }
        }
    )
}

User Messaging Platform (UMP)

How to use

showAdConsent(object : IFrogoAdConsent {

    override fun activity(): Activity {
        return this@MainActivity
    }

    override fun isDebug(): Boolean {
        return BuildConfig.DEBUG
    }

    override fun isUnderAgeAd(): Boolean {
        return false
    }

    override fun onNotUsingAdConsent() {
        // On Not Using Ad Consent
    }

    override fun onConsentSuccess() {
        // On Consent Success
    }

    override fun onConsentError(formError: FormError) {
        // On Consent Error
    }

})

Notes

Allert

Update

>> on version 3.0.0
- import com.frogobox.admob.core.FrogoRvConstant
- import com.frogobox.admob.core.admob.FrogoAdmob
- import com.frogobox.admob.core.admob.FrogoAdmobActivity
- import com.frogobox.admob.core.FrogoAdmobViewHolder
- import com.frogobox.admob.core.FrogoAdmobViewAdapter
- import com.frogobox.admob.core.AdmobViewHolder

>> on version 4.0.0
- import com.frogobox.admob.core.FrogoRvConstant
- import com.frogobox.admob.core.FrogoAdmob
- import com.frogobox.admob.ui.FrogoAdmobActivity
- import com.frogobox.admob.widget.FrogoAdmobViewHolder
- import com.frogobox.admob.widget.FrogoAdmobViewAdapter
- import com.frogobox.admob.widget.AdmobViewHolder

>> on Version 4.2.0
- Add FrogoSdkAdmobActivity
- New Setup Implementation
- Fixing Bug : ShowBanner, ShowInterstitial, ShowRewarded

>> on Version 4.2.6 +
- Add Unity Ads
- Basic Interstitial

Test Ads From Google

// Declaration admob id for debug
def debugAdmobAppId = "ca-app-pub-3940256099942544~3347511713"
def debugAdmobBanner = "ca-app-pub-3940256099942544/6300978111"
def debugAdmobInterstitial = "ca-app-pub-3940256099942544/1033173712"
def debugAdmobInterstitialVideo = "ca-app-pub-3940256099942544/8691691433"
def debugAdmobRewarded = "ca-app-pub-3940256099942544/5224354917"
def debugAdmobRewardedInterstitial = "ca-app-pub-3940256099942544/5354046379"
def debugAdmobNativeAdvanced = "ca-app-pub-3940256099942544/2247696110"
def debugAdmobNativeAdvancedVideo = "ca-app-pub-3940256099942544/1044960115"

Colaborator

Very open to anyone, I'll write your name under this, please contribute by sending an email to me

  • Mail To [email protected]
  • Subject : Github _ [Github-Username-Account] _ [Language] _ [Repository-Name]
  • Example : Github_amirisback_kotlin_admob-helper-implementation

Name Of Contribute

  • Muhammad Faisal Amir
  • Waiting List
  • Waiting List

Waiting for your contribute

Source

Attention !!!

Please enjoy and don't forget fork and give a star

  • Don't Forget Follow My Github Account

ScreenShoot Apps

frogo-admob's People

Contributors

amirisback avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

frogo-admob's Issues

ad listeners

Hi, how can I use ad listeners(ad close listener) especially for rewarded ads. If I use After OnUserEarnedReward to intent other activity rewarded ad stays on in the background. It can be a problem for both users and advertising policy.

Android 12 Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

java.lang.IllegalArgumentException: com.frogobox.appadmob: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

Hope to increase the failure callback

setupShowAdsRewardedInterstitial(object : IFrogoAdmob.UserEarned { override fun onUserEarnedReward(rewardItem: RewardItem) { // TODO User Get Reward } })

error : No ad config

i do not change anything and i try to use test (demo). but show error.

Error - Run - IFrogoAdRewarded [callback] : onAdFailedToLoad()
Error - onAdFailedToLoad [code] : 3
Error - onAdFailedToLoad [domain] : com.google.android.gms.ads
Error - onAdFailedToLoad [message] : No ad config.

Same admob sample in java?

i had visited ur library and it is very helpful .. i want you to please make the same sample app in java so it can be helpful thankyou

saving activity context is bad practice?

Hi there
I see that you save the activity context in the admob class and then use it to show interstitial ads.
isn't it a bad practice to save the activity context as a member variable?
wouldn't it be better practice to pass the activity context only when we want to show an interstitial ad?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.