Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Line] Call onAdHidden method when onDestroy. #376

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hidetoshi-muta
Copy link

Call onAdHidden method when onDestroy, because LINE SDK might close full-screen ad without calling onAdHidden method.

  • For apps implemented using Service API (https://developer.android.com/guide/components/services), LINE SDK closes a full-screen ad without calling onFiveAdClose method, when such app is closed during displaying a full-screen ad.
  • AppLovin SDK does not load the next ad for a while unless onInterstitialAdHidden / onRewardedAdHidden is called after finishing displaying a full-screen ad.

As a result,

  • On app implemented by Service API
  • An user closes app while displaying full-screen Ad, then restarts app. In such case, AppLoving SDK does not load the next ad for a while.

This change fixes the above issue.

We verified patched LineMediationAdapter.java fixes the issue. The reproduced app with patched LineMediationAdapter.java does not reproduce the issue.

Call onAdHidden method when onDestroy, because LINE SDK might close full-screen ad without calling onAdHidden method.

- For apps implemented using Service API (https://developer.android.com/guide/components/services), LINE SDK closes a full-screen ad without calling onFiveAdClose method, when such app is closed during displaying a full-screen ad.
- AppLovin SDK does not load the next ad for a while unless onInterstitialAdHidden / onRewardedAdHidden is called after finishing displaying a full-screen ad.

As a result,
- On app implemented by Service API
- An user closes app while displaying full-screen Ad, then restarts app.
In such case, AppLoving SDK does not load the next ad for a while.

This change fixes the above issue.

We verified patched LineMediationAdapter.java fixes the issue.
The reproduced app with patched LineMediationAdapter.java does not reproduce the issue.
@@ -140,6 +143,18 @@ public void initialize(final MaxAdapterInitializationParameters parameters, fina
@Override
public void onDestroy()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onDestroy() will not be called unless the publisher explicitly calls MaxInterstitialAd#destroy() or MaxRewardedAd#destroy() - which most do not.

It is usually called when the "ad hidden" callback is fired from the mediate SDK - your SDK will need to be able to detect the Activity being dismissed and fire the "ad hidden" callback appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants