{"id":15471768,"url":"https://github.com/itznotabug/appopenadmanager","last_synced_at":"2025-04-22T13:20:38.707Z","repository":{"id":43023853,"uuid":"304638395","full_name":"ItzNotABug/AppOpenAdManager","owner":"ItzNotABug","description":"A simple wrapper to handle the new AppOpenAds","archived":false,"fork":false,"pushed_at":"2024-03-20T11:23:22.000Z","size":286,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T13:20:38.098Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ItzNotABug.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-16T13:40:39.000Z","updated_at":"2023-07-30T00:36:13.000Z","dependencies_parsed_at":"2024-12-14T15:55:45.818Z","dependency_job_id":"f97e57f9-9ed8-4c03-80f9-34cb9c14bff8","html_url":"https://github.com/ItzNotABug/AppOpenAdManager","commit_stats":{"total_commits":115,"total_committers":3,"mean_commits":"38.333333333333336","dds":"0.017391304347826098","last_synced_commit":"b25663135657ba6416caae736fe4b540c7cfddc8"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItzNotABug%2FAppOpenAdManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItzNotABug%2FAppOpenAdManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItzNotABug%2FAppOpenAdManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItzNotABug%2FAppOpenAdManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItzNotABug","download_url":"https://codeload.github.com/ItzNotABug/AppOpenAdManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250246746,"owners_count":21398919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T02:21:41.464Z","updated_at":"2025-04-22T13:20:38.672Z","avatar_url":"https://github.com/ItzNotABug.png","language":"Kotlin","readme":"# AppOpenAdManager\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/af51d9b73c4544cca0be5e0af1b2669c)](https://app.codacy.com/gh/ItzNotABug/AppOpenAdManager?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=ItzNotABug/AppOpenAdManager\u0026utm_campaign=Badge_Grade)\n\n`AppOpenAdManager` is just a simple wrapper to handle the new `AppOpenAd` Format by **Google AdMob**.\\\nIf you look at the [tutorial](https://developers.google.com/admob/android/app-open-ads), you'll see the detailed guide to create a `Helper Class` to manage `AppOpenAd`.\n\n## Dependency\n**Gradle:**\n```groovy\nimplementation 'com.lazygeniouz:aoa_manager:$latest_version'\n```\n\n## Usage\n```kotlin\nval configs = Configs(InitialDelay.NONE, adUnitId, adRequest, showInActivity)\nval adManager = AppOpenAdManager.get(application, configs)\nadManager.setAppOpenAdListener(appOpenAdlistener)\nadManager.setAdTransition(R.anim.enterAnim, R.anim.exitAnim)\nadManager.setOnPaidEventListener(paidEventListener)\nadManager.showAdWithDelay(false)\nadManager.setImmersiveMode(true)\nadManager.loadAppOpenAd()\n```\n\nThe arguments for the static method `get` are:\n*   `@NonNull application: Application`\\\n     Your class extending `android.app.Application`\n\n*   `@NonNull configs: Configs` (Optional)\\\n     You can pass a `Configs` object which is a `data` class to pass relevant options.\\\n     Relevant options are:\n     * `@NonNull initialDelay: InitialDelay`\\\n        You can specify an **Initial Delay** to load \u0026 display the Ad for **the first time**.\\\n        If you do not need a delay, simple pass `InitialDelay.NONE`\\\n        But it is a good practise to allow the user to first explore the App \u0026\\\n        therefore 1 Day should be fine which is also the Default if you pass `InitialDelay()`\n\n     * `adUnitId: String`\\\n        Your `adUnitId`\\\n        (Optional for Testing) Default is a Test AdUnitId\n\n     * `adRequest: AdRequest`\\\n        (Optional) If you have a customised AdRequest\n\n     * `showOnColdStart: Boolean`\\\n        (Optional) Show Ad as soon as it load on the first Cold start if true,\n        this will ignore the Activities passed in the [showInActivities]\n\n     * `showOnCondition: (() -\u003e Boolean)`\\\n        (Optional) Show the AppOpenAd only when a specific condition is met.\n        AppOpenAd will be shown only when this block returns `true`.\n\n     * `showInActivities: Class\u003cout Activity\u003e`\\\n        (Optional) If you want to show the Ad only in specific Activities (e.g: SplashActivity).\\\n        See: [this issue](https://github.com/ItzNotABug/AppOpenAdManager/issues/5) \u0026 the Example App for more info.\n\nOther available methods:\n* `getAppOpenAd: AppOpenAd?`: Returns the `AppOpenAd` instance, can be null.\n\n* `clearAdInstance(): Unit`: Sets the `AppOpenAd` instance to `null` if it is not.\n\n* `isAdAvailable(): Boolean`: Returns `true` if a valid `AppOpenAd` is available\n\n* `setImmersiveMode(Boolean): Unit`: Sets whether to show the `AdOpenAd` in immersive mode.\n\n* `showAdWithDelay(Boolean): Unit`: Delays showing the `AdOpenAd` by 1 second if true.\n\n* `showAdWithDelay(Long): Unit`: Delays showing the `AdOpenAd` by the provided time in milliseconds.\n\n* `setAdTransition(Int, Int): Unit`: Use an activity animation when the Ad is shown, similar to \n`Activity.overridePendingTransition` or `Activity.overrideActivityTransition`.\n\n* `getAdListener(): AppOpenAdListener?`: Returns the currently set Ad Listener, can be null.\n\n* `setAppOpenAdListener(listener: AppOpenAdListener)`:\\\n    There are several callbacks with respect to the AppOpenAd.\n    * `onAdLoaded()` = Invoked when the Ad is loaded successfully.\n    * `onAdFailedToLoad(LoadAdError)` = Invoked when the Ad failed to load with supplied LoadAdError.\n    * `onAdWillShow()` = Invoked before the Ad is shown, a default delay of 1000ms or value provided.\n    * `onAdShown()` = Invoked when the Ad is shown\n    * `onAdDismissed()` = Invoked after the Ad is dismissed from the screen\n    * `onAdShowFailed(AdError)` = Invoked when there was an error showing the Ad with supplied AdError\n\n* `setOnPaidEventListener(listener: OnPaidEventListener)`:\n    * `onPaidEvent(AdValue)` = Called when an ad is estimated to have earned money.\n      * `AdValue` = Contains information about the monetary value earned from an ad.\n\n* `getPaidEventListener(): OnPaidEventListener?`: Returns the currently set Ad's PaidEventListener, can be null..\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitznotabug%2Fappopenadmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitznotabug%2Fappopenadmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitznotabug%2Fappopenadmanager/lists"}