AppLovin / AppLovin-MAX-SDK-Android

Other
210 stars 95 forks source link

How can I preload an Interstitial ads on an Activity then show the ads on another Activity? #629

Closed Nghicv closed 3 months ago

Nghicv commented 3 months ago

Feature Description

How can I preload an Interstitial ads on an Activity then show the ads on another Activity?

thomasmso commented 3 months ago

@Nghicv - You can follow our docs here and use the same MaxInterstitialAd instance across your Activity instances.

Nghicv commented 3 months ago

@Nghicv - You can follow our docs here and use the same MaxInterstitialAd instance across your Activity instances.

HI @thomasmso , Thanks for your support As I checked, MaxInterstitialAd holds an Activity instance at the inittial time. if we use the same MaxInterstitialAd instance across Activity instances, it can lead to leak the inittial Activity.

thomasmso commented 3 months ago

@Nghicv - It actually will not make a difference which Activity instance you pass into the API. Our SDK is able to detect the topmost Activity.

Nghicv commented 3 months ago

@Nghicv - It actually will not make a difference which Activity instance you pass into the API. Our SDK is able to detect the topmost Activity.

Thanks @thomasmso , I think we should use the application context instead of Activity