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

[FR]: Consider Ad Expiration for AppOpenAdManager #135

Closed
2 tasks done
teogor opened this issue Oct 5, 2023 · 0 comments · Fixed by #139
Closed
2 tasks done

[FR]: Consider Ad Expiration for AppOpenAdManager #135

teogor opened this issue Oct 5, 2023 · 0 comments · Fixed by #139
Assignees
Labels
@feature New feature or request @priority-low
Milestone

Comments

@teogor
Copy link
Owner

teogor commented Oct 5, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

The AppOpenAdManager class in the codebase handles the loading and management of app open ads. According to the Google AdMob documentation, app open ads have a timeout period of four hours. This means that ads rendered more than four hours after the request time will no longer be valid and may not earn revenue.

To ensure that we don't display expired ads and provide a better user experience, we should consider ad expiration and implement a mechanism to check the validity of the loaded app open ad.

Suggested Solution

To address this issue, we can implement the following changes in the AppOpenAdManager class:

  1. Introduce a private variable loadTime to keep track of the time when an app open ad was loaded.

  2. Create a method, e.g., wasLoadTimeLessThanNHoursAgo, to calculate the time difference between the current time and the loadTime in hours.

  3. Modify the isAdAvailable method to check if an app open ad is loaded and if it has been less than four hours since it was loaded.

By implementing these changes, we can ensure that we don't show expired ads to users and maintain the quality of ad delivery.

Describe the solution

Additional Information

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@feature New feature or request @priority-low
Projects
Development

Successfully merging a pull request may close this issue.

1 participant