Closed omeratesss closed 6 months ago
Hey @omeratesss - we actually had a few other inquiries with regards to these APIs. Last time we looked at it a few years ago, having an active Activity
and passing that through to some mediated SDKs were a requirement. Things might have changed in 2024. We'll investigate next week and update this thread.
Hi @thomasmso , is there any progress? I am waiting for you.
@omeratesss - I looked into it, and the issue is there are many networks that require an Activity
context to function. For example, if you want to integrate AdMob interstitial ads, it requires us to pass in an Activity
context:
Would your integration have an Activity
context by the time of display? One middleground solution I can think of is to allow for a non-Activity context for SDK init and ad load, but not on show.
@thomasmso, your proposed middleground solution aligns perfectly with our requirements. Our aim is to initialize the SDK and load ads using a non-activity context. When it comes to displaying the ad, we intend to utilize activity contexts.
@omeratesss - we're working on this - pushing new adapters to ensure if an Activity context is not needed, we won't look for one when loading. Then to update SDK to allow passing of the Activity context.
To prevent completely breaking current implementations, we'll likely just deprecate existing APIs first while adding the new ones.
@omeratesss - We just released Android SDK v12.5.0. Our MaxInterstitialAd
class can be created without requiring an Activity context. Just make sure sure to pass in an Activity context when calling MaxInterstitialAd#show(...)
.
Feature Description
I want to load Interstitial ads without opening an Activity. Therefore, the activity parameter is not needed. When I will show an Interstitial ad, the activity parameter is needed. Note: It requires an activity parameter for the MaxInterstitialAd object. But it is cast to context within Applovin SDK. You can see it below. Why does this situation exist? Why can't I give a context parameter to the MaxInterstitialAd object?