├── ad-admob ├── consumer-rules.pro ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ ├── values │ │ │ └── strings.xml │ │ ├── layout │ │ │ ├── frogo_ads_banner.xml │ │ │ ├── frogo_rv_container_empty_view.xml │ │ │ └── frogo_rv_empty_view.xml │ │ └── drawable │ │ │ ├── frogo_rv_bg_card_16dp.xml │ │ │ ├── frogo_rv_bg_card_32dp.xml │ │ │ ├── frogo_rv_bg_card_4dp.xml │ │ │ ├── frogo_rv_bg_card_8dp.xml │ │ │ └── frogo_rv_ic_empty_view.xml │ │ └── java │ │ └── com │ │ └── frogobox │ │ └── admob │ │ ├── callback │ │ ├── FrogoAdmobInterstitialCallback.kt │ │ ├── FrogoAdmobAppOpenAdCallback.kt │ │ ├── FrogoAdmobRewardedCallback.kt │ │ └── FrogoAdmobBannerCallback.kt │ │ ├── ui │ │ ├── AdmobBindActivity.kt │ │ ├── AdmobActivity.kt │ │ ├── FrogoAdmobBindActivity.kt │ │ └── FrogoAdmobActivity.kt │ │ ├── widget │ │ ├── IFrogoAdmobViewAdapter.kt │ │ ├── AdmobViewHolder.kt │ │ └── FrogoAdmobViewHolder.kt │ │ ├── core │ │ ├── IFrogoAdConsent.kt │ │ ├── IFrogoAdmob.kt │ │ ├── IFrogoAdmobInterstitial.kt │ │ ├── IFrogoAdmobRewarded.kt │ │ └── IFrogoAdmobBanner.kt │ │ └── FrogoAdmobApplication.kt ├── proguard-rules.pro └── build.gradle.kts ├── ad-core ├── .gitignore ├── consumer-rules.pro ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── frogobox │ │ └── adcore │ │ ├── source │ │ ├── FrogoAdmobApiResponse.kt │ │ ├── FrogoAdmobDataSource.kt │ │ ├── FrogoAdmobApiService.kt │ │ └── FrogoAdmobRepository.kt │ │ ├── callback │ │ └── FrogoAdCoreInterstitialCallback.kt │ │ ├── model │ │ ├── FrogoUnityId.kt │ │ ├── FrogoAdmobId.kt │ │ └── FrogoMonetizeId.kt │ │ └── util │ │ ├── FrogoAdFunc.kt │ │ └── FrogoAdConstant.kt ├── proguard-rules.pro └── build.gradle.kts ├── ad-general ├── .gitignore ├── consumer-rules.pro ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── frogobox │ │ └── ad │ │ ├── ui │ │ ├── AdBindActivity.kt │ │ ├── AdActivity.kt │ │ ├── FrogoAdActivity.kt │ │ └── FrogoAdBindActivity.kt │ │ ├── callback │ │ └── FrogoAdInterstitialCallback.kt │ │ └── delegate │ │ └── FrogoAdDelegates.kt ├── proguard-rules.pro └── build.gradle.kts ├── ad-unityad ├── .gitignore ├── consumer-rules.pro ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── frogobox │ │ └── unityad │ │ ├── ui │ │ ├── UnityAdBindActivity.kt │ │ ├── UnityAdActivity.kt │ │ ├── FrogoUnityAdActivity.kt │ │ └── FrogoUnityAdBindActivity.kt │ │ ├── callback │ │ ├── FrogoUnityAdInitializationCallback.kt │ │ └── FrogoUnityAdInterstitialCallback.kt │ │ ├── delegate │ │ ├── UnityAdDelegates.kt │ │ └── UnityAdDelegatesImpl.kt │ │ └── core │ │ └── IFrogoUnityAd.kt ├── proguard-rules.pro └── build.gradle.kts ├── app ├── .gitignore ├── frogoboxmedia.jks ├── src │ └── main │ │ ├── res │ │ ├── drawable │ │ │ ├── ic_apps.png │ │ │ └── ic_toolbar_about_us.xml │ │ ├── font │ │ │ └── montserrat_regular.ttf │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── values │ │ │ ├── attrs.xml │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ ├── themes.xml │ │ │ ├── base_colors.xml │ │ │ └── dimens.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── layout │ │ │ ├── activity_banner.xml │ │ │ ├── fragment_main.xml │ │ │ ├── activity_recycler_view.xml │ │ │ ├── acitivity_compose.xml │ │ │ ├── ads_phone_tab_special_smart_banner.xml │ │ │ ├── ads_phone_tab_special_adaptive_banner.xml │ │ │ ├── ads_phone_tab_banner.xml │ │ │ ├── ads_tablet_full_banner.xml │ │ │ ├── ads_tablet_leaderboard.xml │ │ │ ├── ads_phone_tab_large_banner.xml │ │ │ ├── ads_phone_tab_medium_rectangle.xml │ │ │ ├── content_item_ad_banner.xml │ │ │ ├── activity_app_open_ad.xml │ │ │ ├── content_item_news.xml │ │ │ ├── activity_main.xml │ │ │ └── activity_rewarded.xml │ │ ├── values-night │ │ │ ├── colors.xml │ │ │ └── themes.xml │ │ ├── menu │ │ │ └── menu_toolbar_main.xml │ │ └── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ ├── assets │ │ ├── unity_id.json │ │ ├── admob_id.json │ │ └── monetize_id.json │ │ ├── java │ │ └── com │ │ │ └── frogobox │ │ │ └── appadmob │ │ │ ├── mvvm │ │ │ ├── banner │ │ │ │ └── BannerActivity.kt │ │ │ ├── main │ │ │ │ ├── AboutUsActivity.kt │ │ │ │ ├── MainFragment.kt │ │ │ │ ├── MainViewModel.kt │ │ │ │ ├── MainJavaActivity.java │ │ │ │ └── MainActivity.kt │ │ │ ├── news │ │ │ │ ├── NewsAdapter.kt │ │ │ │ ├── NewsHolder.kt │ │ │ │ └── NewsActivity.kt │ │ │ ├── movie │ │ │ │ ├── MovieAdapter.kt │ │ │ │ ├── MovieHolder.kt │ │ │ │ └── MovieActivity.kt │ │ │ ├── appopenad │ │ │ │ └── AppOpenAdActivity.kt │ │ │ └── rewarded │ │ │ │ └── RewardedActivity.kt │ │ │ ├── util │ │ │ ├── Constant.kt │ │ │ └── AdHelper.kt │ │ │ ├── source │ │ │ ├── AdmobCallback.kt │ │ │ ├── AdmobDataSource.kt │ │ │ ├── AdmobLocalDataSource.kt │ │ │ ├── AdmobRepository.kt │ │ │ └── AdmobRemoteDataSource.kt │ │ │ ├── di │ │ │ ├── ViewModelModule.kt │ │ │ └── RepositoryModule.kt │ │ │ ├── SampleAdmobApplication.kt │ │ │ ├── FrogoKoinApplication.kt │ │ │ ├── FrogoAdmobKoinApplication.kt │ │ │ └── base │ │ │ ├── BaseFragment.kt │ │ │ └── BaseActivity.kt │ │ └── AndroidManifest.xml └── proguard-rules.pro ├── _config.yml ├── docs └── image │ ├── ss-ump.jpg │ ├── mad_score.png │ ├── ss_banner.png │ ├── ss_image_1.png │ ├── ss_image_2.png │ └── ss_image_3.png ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties └── libs.versions.toml ├── jitpack.yml ├── action.yml ├── .gitignore ├── .github ├── FUNDING.yml └── workflows │ ├── android-ci.yml │ ├── android-ci-generated-artifact.yml │ └── detekt-analysis.yml ├── SECURITY.md ├── settings.gradle.kts ├── gradle.properties ├── gradlew.bat └── CODE_OF_CONDUCT.md /ad-admob/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ad-core/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /ad-core/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ad-general/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /ad-unityad/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /ad-admob/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /ad-general/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ad-unityad/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /app/frogoboxmedia.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/frogoboxmedia.jks -------------------------------------------------------------------------------- /docs/image/ss-ump.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/docs/image/ss-ump.jpg -------------------------------------------------------------------------------- /docs/image/mad_score.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/docs/image/mad_score.png -------------------------------------------------------------------------------- /docs/image/ss_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/docs/image/ss_banner.png -------------------------------------------------------------------------------- /docs/image/ss_image_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/docs/image/ss_image_1.png -------------------------------------------------------------------------------- /docs/image/ss_image_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/docs/image/ss_image_2.png -------------------------------------------------------------------------------- /docs/image/ss_image_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/docs/image/ss_image_3.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/drawable/ic_apps.png -------------------------------------------------------------------------------- /jitpack.yml: -------------------------------------------------------------------------------- 1 | jdk: 2 | - openjdk17 3 | before_install: 4 | - sdk install java 17.0.1-open 5 | - sdk use java 17.0.1-open 6 | -------------------------------------------------------------------------------- /app/src/main/res/font/montserrat_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/font/montserrat_regular.ttf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/frogo-admob/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ad-core/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ad-general/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ad-unityad/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jan 19 18:13:54 ICT 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStorePath=wrapper/dists 5 | zipStoreBase=GRADLE_USER_HOME 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip -------------------------------------------------------------------------------- /app/src/main/assets/unity_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "unityGameID": "", 3 | "unityInterstitialID": [ 4 | "", 5 | "", 6 | "" 7 | ], 8 | "unityBannerId": [ 9 | "", 10 | "", 11 | "" 12 | ], 13 | "unityRewardedID": [ 14 | "", 15 | "", 16 | "" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /ad-admob/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'FrogoAdmob' 2 | description: 'Admob Helper for your android apps' 3 | author: 'Muhammad Faisal Amir' 4 | branding: 5 | icon: archive 6 | color: green 7 | inputs: 8 | myInput: 9 | description: 'Input to use' 10 | required: false 11 | default: 'world' 12 | runs: 13 | using: 'docker' 14 | image: 'Dockerfile' 15 | args: 16 | - ${{ inputs.myInput }} 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/mvvm/banner/BannerActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.mvvm.banner 2 | 3 | import com.frogobox.appadmob.base.BaseActivity 4 | import com.frogobox.appadmob.databinding.ActivityBannerBinding 5 | 6 | class BannerActivity : BaseActivity() { 7 | 8 | override fun setupViewBinding(): ActivityBannerBinding { 9 | return ActivityBannerBinding.inflate(layoutInflater) 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_toolbar_about_us.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | /.gradle 3 | .gradle 4 | .idea 5 | /local.properties 6 | /.idea/libraries 7 | /.idea/modules.xml 8 | /.idea/workspace.xml 9 | .DS_Store 10 | build 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | 15 | built application files 16 | *.apk 17 | *.aab 18 | 19 | files for the dex VM 20 | *.dex 21 | 22 | Java class files 23 | *.class 24 | 25 | generated files 26 | bin/ 27 | gen/ 28 | .externalNativeBuild/ 29 | 30 | Local configuration file (sdk path, etc) 31 | local.properties 32 | app/version.properties 33 | 34 | # SonarQube 35 | .sonar/ 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_recycler_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /ad-admob/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BANNER 5 | LARGE_BANNER 6 | MEDIUM_RECTANGLE 7 | FULL_BANNER 8 | LEADERBOARD 9 | SMART_BANNER 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/acitivity_compose.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /ad-core/src/main/java/com/frogobox/adcore/source/FrogoAdmobApiResponse.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.adcore.source 2 | 3 | import com.frogobox.coresdk.response.FrogoDataResponse 4 | 5 | 6 | /** 7 | * Created by faisalamir on 02/03/22 8 | * FrogoAdmob 9 | * ----------------------------------------- 10 | * Name : Muhammad Faisal Amir 11 | * E-mail : faisalamircs@gmail.com 12 | * Github : github.com/amirisback 13 | * ----------------------------------------- 14 | * Copyright (C) 2022 Frogobox Media Inc. 15 | * All rights reserved 16 | * 17 | */ 18 | 19 | 20 | interface FrogoAdmobApiResponse : FrogoDataResponse -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: amirisback 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: amirisback 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: https://saweria.co/amirisback 13 | -------------------------------------------------------------------------------- /ad-core/src/main/java/com/frogobox/adcore/callback/FrogoAdCoreInterstitialCallback.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.adcore.callback 2 | 3 | // Created by KoinWorks (M. Faisal Amir) on 20/06/22. 4 | 5 | 6 | interface FrogoAdCoreInterstitialCallback { 7 | 8 | fun onShowAdRequestProgress(tag: String, message: String) 9 | 10 | fun onHideAdRequestProgress(tag: String, message: String) 11 | 12 | fun onAdDismissed(tag: String, message: String) 13 | 14 | fun onAdFailed(tag: String, errorMessage: String) 15 | 16 | fun onAdLoaded(tag: String, message: String) 17 | 18 | fun onAdShowed(tag: String, message: String) 19 | 20 | } -------------------------------------------------------------------------------- /ad-general/src/main/java/com/frogobox/ad/ui/AdBindActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.ad.ui 2 | 3 | import androidx.viewbinding.ViewBinding 4 | 5 | /** 6 | * Created by Faisal Amir on 07/02/23 7 | * https://github.com/amirisback 8 | */ 9 | 10 | 11 | abstract class AdBindActivity : AdActivity() { 12 | 13 | companion object { 14 | val TAG: String = AdBindActivity::class.java.simpleName 15 | } 16 | 17 | protected val binding: VB by lazy { setupViewBinding() } 18 | 19 | abstract fun setupViewBinding(): VB 20 | 21 | override fun setupContentView() { 22 | setContentView(binding.root) 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /ad-general/src/main/java/com/frogobox/ad/callback/FrogoAdInterstitialCallback.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.ad.callback 2 | 3 | import com.frogobox.unityad.callback.FrogoUnityAdInterstitialCallback 4 | 5 | /** 6 | * Created by faisalamir on 22/03/22 7 | * FrogoAdmob 8 | * ----------------------------------------- 9 | * Name : Muhammad Faisal Amir 10 | * E-mail : faisalamircs@gmail.com 11 | * Github : github.com/amirisback 12 | * ----------------------------------------- 13 | * Copyright (C) 2022 Frogobox Media Inc. 14 | * All rights reserved 15 | * 16 | */ 17 | 18 | 19 | interface FrogoAdInterstitialCallback : FrogoUnityAdInterstitialCallback -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/callback/FrogoAdmobInterstitialCallback.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.callback 2 | 3 | import com.frogobox.adcore.callback.FrogoAdCoreInterstitialCallback 4 | 5 | 6 | /** 7 | * Created by faisalamir on 13/03/22 8 | * FrogoAdmob 9 | * ----------------------------------------- 10 | * Name : Muhammad Faisal Amir 11 | * E-mail : faisalamircs@gmail.com 12 | * Github : github.com/amirisback 13 | * ----------------------------------------- 14 | * Copyright (C) 2022 Frogobox Media Inc. 15 | * All rights reserved 16 | * 17 | */ 18 | 19 | interface FrogoAdmobInterstitialCallback : FrogoAdCoreInterstitialCallback -------------------------------------------------------------------------------- /ad-admob/src/main/res/layout/frogo_ads_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/ui/AdmobBindActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.ui 2 | 3 | import androidx.viewbinding.ViewBinding 4 | 5 | /** 6 | * Created by Faisal Amir on 07/02/23 7 | * https://github.com/amirisback 8 | */ 9 | 10 | 11 | abstract class AdmobBindActivity : AdmobActivity() { 12 | 13 | companion object { 14 | val TAG: String = AdmobBindActivity::class.java.simpleName 15 | } 16 | 17 | protected val binding: VB by lazy { setupViewBinding() } 18 | 19 | abstract fun setupViewBinding(): VB 20 | 21 | override fun setupContentView() { 22 | setContentView(binding.root) 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /ad-unityad/src/main/java/com/frogobox/unityad/ui/UnityAdBindActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.unityad.ui 2 | 3 | import androidx.viewbinding.ViewBinding 4 | 5 | /** 6 | * Created by Faisal Amir on 07/02/23 7 | * https://github.com/amirisback 8 | */ 9 | 10 | 11 | abstract class UnityAdBindActivity : UnityAdActivity() { 12 | 13 | companion object { 14 | val TAG: String = UnityAdBindActivity::class.java.simpleName 15 | } 16 | 17 | protected val binding: VB by lazy { setupViewBinding() } 18 | 19 | abstract fun setupViewBinding(): VB 20 | 21 | override fun setupContentView() { 22 | setContentView(binding.root) 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/mvvm/main/AboutUsActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.mvvm.main 2 | 3 | import android.os.Bundle 4 | import com.frogobox.ad.ui.FrogoAdBindActivity 5 | import com.frogobox.sdk.databinding.ActivityFrogoAboutUsBinding 6 | 7 | class AboutUsActivity : FrogoAdBindActivity() { 8 | 9 | override fun setupViewBinding(): ActivityFrogoAboutUsBinding { 10 | return ActivityFrogoAboutUsBinding.inflate(layoutInflater) 11 | } 12 | 13 | override fun setupViewModel() { 14 | } 15 | 16 | 17 | override fun onCreateExt(savedInstanceState: Bundle?) { 18 | setupDetailActivity("About Us") 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/mvvm/main/MainFragment.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.mvvm.main 2 | 3 | import android.view.LayoutInflater 4 | import android.view.ViewGroup 5 | import androidx.fragment.app.Fragment 6 | import com.frogobox.appadmob.base.BaseFragment 7 | import com.frogobox.appadmob.databinding.FragmentMainBinding 8 | 9 | /** 10 | * A simple [Fragment] subclass. 11 | */ 12 | class MainFragment : BaseFragment() { 13 | 14 | override fun setupViewBinding( 15 | inflater: LayoutInflater, 16 | container: ViewGroup? 17 | ): FragmentMainBinding { 18 | return FragmentMainBinding.inflate(inflater, container, false) 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/util/Constant.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.util 2 | 3 | /** 4 | * Created by Faisal Amir on 24/10/22 5 | * ----------------------------------------- 6 | * E-mail : faisalamircs@gmail.com 7 | * Github : github.com/amirisback 8 | * ----------------------------------------- 9 | * Copyright (C) Frogobox ID / amirisback 10 | * All rights reserved 11 | */ 12 | 13 | 14 | object Constant { 15 | 16 | const val AD_UNIT_ID = "ca-app-pub-3940256099942544/3419835294" 17 | const val COUNTER_TIME = 5L 18 | 19 | // Preference 20 | const val PREFERENCE_NAME = "PREFERENCE_NAME_APP_OPEN_AD" 21 | const val PREF_AD_UNIT_ID = "PREF_AD_UNIT_ID" 22 | 23 | } -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /ad-admob/src/main/res/drawable/frogo_rv_bg_card_16dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ad-admob/src/main/res/drawable/frogo_rv_bg_card_32dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ad-admob/src/main/res/drawable/frogo_rv_bg_card_4dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ad-admob/src/main/res/drawable/frogo_rv_bg_card_8dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ad-unityad/src/main/java/com/frogobox/unityad/callback/FrogoUnityAdInitializationCallback.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.unityad.callback 2 | 3 | 4 | /** 5 | * Created by faisalamir on 22/03/22 6 | * FrogoAdmob 7 | * ----------------------------------------- 8 | * Name : Muhammad Faisal Amir 9 | * E-mail : faisalamircs@gmail.com 10 | * Github : github.com/amirisback 11 | * ----------------------------------------- 12 | * Copyright (C) 2022 Frogobox Media Inc. 13 | * All rights reserved 14 | * 15 | */ 16 | 17 | interface FrogoUnityAdInitializationCallback { 18 | 19 | fun onInitializationComplete(tag: String, message: String) 20 | 21 | fun onInitializationFailed(tag: String, message: String) 22 | 23 | } -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/callback/FrogoAdmobAppOpenAdCallback.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.callback 2 | 3 | import com.frogobox.adcore.callback.FrogoAdCoreInterstitialCallback 4 | 5 | /** 6 | * Created by Faisal Amir on 24/10/22 7 | * ----------------------------------------- 8 | * E-mail : faisalamircs@gmail.com 9 | * Github : github.com/amirisback 10 | * ----------------------------------------- 11 | * Copyright (C) Frogobox ID / amirisback 12 | * All rights reserved 13 | */ 14 | 15 | 16 | /** 17 | * Interface definition for a callback to be invoked when an app open ad is complete (i.e. 18 | * dismissed or fails to show). 19 | */ 20 | interface FrogoAdmobAppOpenAdCallback : FrogoAdCoreInterstitialCallback -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello blank fragment 4 | 5 | Frogobox Software Industry 6 | toolbar_about_us 7 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam veniam similiquevoluptates odit, ipsum laborum architecto distinctio harum, provident fugiat praesentium ex quod doloreslaudantium aliquid quidem placeat incidunt vitae! 8 | Dummy 9 | MainActivity 10 | ComposeActivity 11 | 12 | 13 | -------------------------------------------------------------------------------- /ad-unityad/src/main/java/com/frogobox/unityad/callback/FrogoUnityAdInterstitialCallback.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.unityad.callback 2 | 3 | import com.frogobox.adcore.callback.FrogoAdCoreInterstitialCallback 4 | 5 | 6 | /** 7 | * Created by faisalamir on 22/03/22 8 | * FrogoAdmob 9 | * ----------------------------------------- 10 | * Name : Muhammad Faisal Amir 11 | * E-mail : faisalamircs@gmail.com 12 | * Github : github.com/amirisback 13 | * ----------------------------------------- 14 | * Copyright (C) 2022 Frogobox Media Inc. 15 | * All rights reserved 16 | * 17 | */ 18 | 19 | 20 | interface FrogoUnityAdInterstitialCallback : FrogoAdCoreInterstitialCallback { 21 | 22 | fun onClicked(tag: String, message: String) 23 | 24 | } -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/widget/IFrogoAdmobViewAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.widget 2 | 3 | import android.view.ViewGroup 4 | 5 | /** 6 | * Created by Faisal Amir on 31/01/2021 7 | * AdmobSamples Source Code 8 | * ----------------------------------------- 9 | * Name : Muhammad Faisal Amir 10 | * E-mail : faisalamircs@gmail.com 11 | * Github : github.com/amirisback 12 | * ----------------------------------------- 13 | * Copyright (C) 2021 FrogoBox Inc. 14 | * All rights reserved 15 | * 16 | */ 17 | 18 | 19 | interface IFrogoAdmobViewAdapter { 20 | 21 | fun onViewTypeMenuItem(parent: ViewGroup): FrogoAdmobViewHolder 22 | 23 | fun onViewTypeBannerAds(parent: ViewGroup): FrogoAdmobViewHolder 24 | 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/source/AdmobCallback.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.source 2 | 3 | 4 | /** 5 | * Created by faisalamir on 19/04/22 6 | * FrogoAdmob 7 | * ----------------------------------------- 8 | * Name : Muhammad Faisal Amir 9 | * E-mail : faisalamircs@gmail.com 10 | * Github : github.com/amirisback 11 | * ----------------------------------------- 12 | * Copyright (C) 2022 Frogobox Media Inc. 13 | * All rights reserved 14 | * 15 | */ 16 | 17 | interface AdmobCallback { 18 | 19 | fun onShowAdRequestProgress() 20 | 21 | fun onHideAdRequestProgress() 22 | 23 | fun onAdDismissed() 24 | 25 | fun onAdFailed(tag: String, errorMessage: String) 26 | 27 | fun onAdLoaded() 28 | 29 | fun onAdShowed() 30 | 31 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/mvvm/main/MainViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.mvvm.main 2 | 3 | import android.content.Context 4 | import com.frogobox.appadmob.base.BaseViewModel 5 | import com.frogobox.appadmob.source.AdmobRepository 6 | 7 | 8 | /** 9 | * Created by faisalamir on 19/04/22 10 | * FrogoAdmob 11 | * ----------------------------------------- 12 | * Name : Muhammad Faisal Amir 13 | * E-mail : faisalamircs@gmail.com 14 | * Github : github.com/amirisback 15 | * ----------------------------------------- 16 | * Copyright (C) 2022 Frogobox Media Inc. 17 | * All rights reserved 18 | * 19 | */ 20 | 21 | class MainViewModel( 22 | private val context: Context, 23 | private val repository: AdmobRepository 24 | ) : BaseViewModel(context, repository) -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/callback/FrogoAdmobRewardedCallback.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.callback 2 | 3 | import com.frogobox.adcore.callback.FrogoAdCoreInterstitialCallback 4 | import com.google.android.gms.ads.rewarded.RewardItem 5 | 6 | 7 | /** 8 | * Created by faisalamir on 13/03/22 9 | * FrogoAdmob 10 | * ----------------------------------------- 11 | * Name : Muhammad Faisal Amir 12 | * E-mail : faisalamircs@gmail.com 13 | * Github : github.com/amirisback 14 | * ----------------------------------------- 15 | * Copyright (C) 2022 Frogobox Media Inc. 16 | * All rights reserved 17 | * 18 | */ 19 | 20 | interface FrogoAdmobRewardedCallback : FrogoAdCoreInterstitialCallback { 21 | 22 | fun onUserEarnedReward(tag: String, rewardItem: RewardItem) 23 | 24 | } -------------------------------------------------------------------------------- /app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @color/purple_200 6 | @color/purple_700 7 | @color/black 8 | 9 | 10 | @color/teal_200 11 | @color/teal_200 12 | @color/black 13 | 14 | 15 | @color/colorTextWhite 16 | @color/colorTextWhite 17 | @color/colorTextWhite 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @color/purple_500 6 | @color/purple_700 7 | @color/white 8 | 9 | 10 | @color/teal_200 11 | @color/teal_700 12 | @color/black 13 | 14 | 15 | @color/colorTextBlack 16 | @color/colorTextGrey 17 | @color/colorTextGrey 18 | 19 | 20 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google{ 5 | content { 6 | includeGroupByRegex("com\\.android.*") 7 | includeGroupByRegex("com\\.google.*") 8 | includeGroupByRegex("androidx.*") 9 | } 10 | } 11 | mavenCentral() 12 | maven("https://jitpack.io") 13 | } 14 | } 15 | 16 | dependencyResolutionManagement { 17 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 18 | repositories { 19 | google() 20 | mavenCentral() 21 | maven("https://jitpack.io") 22 | } 23 | } 24 | 25 | rootProject.name = "FrogoAdmob" 26 | include( 27 | ":app", 28 | ":ad-general", 29 | ":ad-admob", 30 | ":ad-core", 31 | ":ad-unityad" 32 | ) -------------------------------------------------------------------------------- /ad-admob/src/main/res/layout/frogo_rv_container_empty_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ad-core/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/core/IFrogoAdConsent.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.core 2 | 3 | import android.app.Activity 4 | import com.google.android.ump.FormError 5 | 6 | /** 7 | * Created by Amir on 06/18/23 8 | * FrogoAdmob Source Code 9 | * ----------------------------------------- 10 | * Name : Muhammad Faisal Amir 11 | * E-mail : faisalamircs@gmail.com 12 | * Github : github.com/amirisback 13 | * ----------------------------------------- 14 | * Copyright (C) 2023 FrogoBox Inc. 15 | * All rights reserved 16 | * 17 | */ 18 | interface IFrogoAdConsent { 19 | 20 | fun activity(): Activity 21 | 22 | fun isDebug(): Boolean 23 | 24 | fun isUnderAgeAd(): Boolean 25 | 26 | fun onNotUsingAdConsent() 27 | 28 | fun onConsentSuccess() 29 | 30 | fun onConsentError(formError: FormError) 31 | 32 | } -------------------------------------------------------------------------------- /ad-general/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /ad-unityad/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /ad-admob/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle.kts. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/widget/AdmobViewHolder.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.widget 2 | 3 | import android.view.View 4 | import com.frogobox.recycler.core.FrogoRecyclerNotifyListener 5 | 6 | /** 7 | * Created by Faisal Amir on 31/01/2021 8 | * AdmobSamples Source Code 9 | * ----------------------------------------- 10 | * Name : Muhammad Faisal Amir 11 | * E-mail : faisalamircs@gmail.com 12 | * Github : github.com/amirisback 13 | * ----------------------------------------- 14 | * Copyright (C) 2021 FrogoBox Inc. 15 | * All rights reserved 16 | * 17 | */ 18 | 19 | 20 | class AdmobViewHolder(view: View) : FrogoAdmobViewHolder(view) { 21 | override fun initComponent( 22 | data: Any, 23 | position: Int, 24 | notifyListener: FrogoRecyclerNotifyListener 25 | ) { 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle.kts.kts. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_toolbar_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 22 | 23 | 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/di/ViewModelModule.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.di 2 | 3 | import com.frogobox.appadmob.mvvm.main.MainViewModel 4 | import org.koin.android.ext.koin.androidApplication 5 | import org.koin.android.ext.koin.androidContext 6 | import org.koin.androidx.viewmodel.dsl.viewModel 7 | import org.koin.dsl.module 8 | 9 | 10 | /** 11 | * Created by faisalamir on 19/04/22 12 | * FrogoAdmob 13 | * ----------------------------------------- 14 | * Name : Muhammad Faisal Amir 15 | * E-mail : faisalamircs@gmail.com 16 | * Github : github.com/amirisback 17 | * ----------------------------------------- 18 | * Copyright (C) 2022 Frogobox Media Inc. 19 | * All rights reserved 20 | * 21 | */ 22 | 23 | val viewModelModule = module { 24 | 25 | viewModel { 26 | MainViewModel(androidContext(), get()) 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/util/AdHelper.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.util 2 | 3 | import android.content.Context 4 | import com.frogobox.sdk.delegate.preference.PreferenceDelegatesImpl 5 | 6 | /** 7 | * Created by Faisal Amir on 24/10/22 8 | * ----------------------------------------- 9 | * E-mail : faisalamircs@gmail.com 10 | * Github : github.com/amirisback 11 | * ----------------------------------------- 12 | * Copyright (C) Frogobox ID / amirisback 13 | * All rights reserved 14 | */ 15 | 16 | 17 | object AdHelper { 18 | 19 | fun getAdOpenAppUnitId(context: Context?): String { 20 | return if (context != null) { 21 | PreferenceDelegatesImpl(context, Constant.PREFERENCE_NAME).getPrefString(Constant.PREF_AD_UNIT_ID, Constant.AD_UNIT_ID) 22 | } else { 23 | Constant.AD_UNIT_ID 24 | } 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /app/src/main/assets/admob_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "testAdmobAppId": "ca-app-pub-3940256099942544~3347511713", 3 | "testAdmobBanner": "ca-app-pub-3940256099942544/6300978111", 4 | "testAdmobInterstitial": "ca-app-pub-3940256099942544/1033173712", 5 | "testAdmobRewarded": "ca-app-pub-3940256099942544/5224354917", 6 | "admobAppId": "ca-app-pub-3940256099942544~3347511713", 7 | "admobBannerID": [ 8 | "ca-app-pub-3940256099942544/6300978111", 9 | "ca-app-pub-3940256099942544/6300978111", 10 | "ca-app-pub-3940256099942544/6300978111" 11 | ], 12 | "admobInterstitialID": [ 13 | "ca-app-pub-3940256099942544/1033173712", 14 | "ca-app-pub-3940256099942544/1033173712", 15 | "ca-app-pub-3940256099942544/1033173712" 16 | ], 17 | "admobRewardedID": [ 18 | "ca-app-pub-3940256099942544/5224354917", 19 | "ca-app-pub-3940256099942544/5224354917", 20 | "ca-app-pub-3940256099942544/5224354917" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/source/AdmobDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.source 2 | 3 | import android.content.Context 4 | import com.frogobox.coresdk.response.FrogoDataResponse 5 | import com.frogobox.coresdk.source.ICoreDataSource 6 | import com.google.android.gms.ads.interstitial.InterstitialAd 7 | 8 | 9 | /** 10 | * Created by faisalamir on 19/04/22 11 | * FrogoAdmob 12 | * ----------------------------------------- 13 | * Name : Muhammad Faisal Amir 14 | * E-mail : faisalamircs@gmail.com 15 | * Github : github.com/amirisback 16 | * ----------------------------------------- 17 | * Copyright (C) 2022 Frogobox Media Inc. 18 | * All rights reserved 19 | * 20 | */ 21 | 22 | interface AdmobDataSource : ICoreDataSource { 23 | 24 | fun getInterstitial(context: Context, callback: FrogoDataResponse) 25 | 26 | fun saveInterstitial(interstitialAd: InterstitialAd) 27 | 28 | } -------------------------------------------------------------------------------- /ad-unityad/src/main/java/com/frogobox/unityad/ui/UnityAdActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.unityad.ui 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.frogobox.unityad.delegate.UnityAdDelegates 6 | import com.frogobox.unityad.delegate.UnityAdDelegatesImpl 7 | 8 | /** 9 | * Created by Faisal Amir on 07/02/23 10 | * https://github.com/amirisback 11 | */ 12 | 13 | 14 | abstract class UnityAdActivity : AppCompatActivity(), 15 | UnityAdDelegates by UnityAdDelegatesImpl() { 16 | 17 | companion object { 18 | val TAG: String = UnityAdActivity::class.java.simpleName 19 | } 20 | 21 | open fun setupMonetized() { 22 | setupUnityAdDelegates(this) 23 | } 24 | 25 | open fun setupContentView() {} 26 | 27 | override fun onCreate(savedInstanceState: Bundle?) { 28 | super.onCreate(savedInstanceState) 29 | setupContentView() 30 | setupMonetized() 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/ui/AdmobActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.ui 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.frogobox.admob.delegate.AdmobDelegates 6 | import com.frogobox.admob.delegate.AdmobDelegatesImpl 7 | 8 | /** 9 | * Created by Faisal Amir on 07/02/23 10 | * https://github.com/amirisback 11 | */ 12 | 13 | 14 | abstract class AdmobActivity : AppCompatActivity(), 15 | AdmobDelegates by AdmobDelegatesImpl() { 16 | 17 | companion object { 18 | val TAG: String = AdmobActivity::class.java.simpleName 19 | } 20 | 21 | open fun setupMonetized() { 22 | setupAdmobDelegates(this) 23 | setupAdmobApp() 24 | } 25 | 26 | open fun setupContentView() {} 27 | 28 | override fun onCreate(savedInstanceState: Bundle?) { 29 | super.onCreate(savedInstanceState) 30 | setupContentView() 31 | setupMonetized() 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/ads_phone_tab_special_smart_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ads_phone_tab_special_adaptive_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ads_phone_tab_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ads_tablet_full_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ads_tablet_leaderboard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ads_phone_tab_large_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ads_phone_tab_medium_rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /ad-core/src/main/java/com/frogobox/adcore/model/FrogoUnityId.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.adcore.model 2 | 3 | import androidx.annotation.Keep 4 | import com.google.gson.annotations.SerializedName 5 | 6 | 7 | /** 8 | * Created by faisalamir on 22/03/22 9 | * FrogoAdmob 10 | * ----------------------------------------- 11 | * Name : Muhammad Faisal Amir 12 | * E-mail : faisalamircs@gmail.com 13 | * Github : github.com/amirisback 14 | * ----------------------------------------- 15 | * Copyright (C) 2022 Frogobox Media Inc. 16 | * All rights reserved 17 | * 18 | */ 19 | 20 | @Keep 21 | data class FrogoUnityId( 22 | 23 | @SerializedName("unityGameID") 24 | var unityGameID: String = "", 25 | 26 | @SerializedName("unityInterstitialID") 27 | var unityInterstitialID: List = listOf("", "", ""), 28 | 29 | @SerializedName("unityBannerId") 30 | var unityBannerId: List = listOf("", "", ""), 31 | 32 | @SerializedName("unityRewardedID") 33 | var unityRewardedID: List = listOf("", "", "") 34 | 35 | ) 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_item_ad_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/ui/FrogoAdmobBindActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.ui 2 | 3 | import androidx.viewbinding.ViewBinding 4 | import com.frogobox.admob.delegate.AdmobDelegates 5 | import com.frogobox.admob.delegate.AdmobDelegatesImpl 6 | import com.frogobox.sdk.view.FrogoBindActivity 7 | 8 | 9 | /** 10 | * Created by faisalamir on 01/03/22 11 | * FrogoAdmob 12 | * ----------------------------------------- 13 | * Name : Muhammad Faisal Amir 14 | * E-mail : faisalamircs@gmail.com 15 | * Github : github.com/amirisback 16 | * ----------------------------------------- 17 | * Copyright (C) 2022 Frogobox Media Inc. 18 | * All rights reserved 19 | * 20 | */ 21 | 22 | 23 | abstract class FrogoAdmobBindActivity : FrogoBindActivity(), 24 | AdmobDelegates by AdmobDelegatesImpl() { 25 | 26 | companion object { 27 | val TAG: String = FrogoAdmobBindActivity::class.java.simpleName 28 | } 29 | 30 | override fun setupMonetized() { 31 | super.setupMonetized() 32 | setupAdmobDelegates(this) 33 | setupAdmobApp() 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /ad-unityad/src/main/java/com/frogobox/unityad/delegate/UnityAdDelegates.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.unityad.delegate 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import com.frogobox.unityad.callback.FrogoUnityAdInitializationCallback 5 | import com.frogobox.unityad.callback.FrogoUnityAdInterstitialCallback 6 | 7 | /** 8 | * Created by faisalamir on 22/03/22 9 | * FrogoAdmob 10 | * ----------------------------------------- 11 | * Name : Muhammad Faisal Amir 12 | * E-mail : faisalamircs@gmail.com 13 | * Github : github.com/amirisback 14 | * ----------------------------------------- 15 | * Copyright (C) 2022 Frogobox Media Inc. 16 | * All rights reserved 17 | * 18 | */ 19 | 20 | 21 | interface UnityAdDelegates { 22 | 23 | fun setupUnityAdDelegates(activity: AppCompatActivity) 24 | 25 | fun setupUnityAdApp( 26 | testMode: Boolean, 27 | unityGameId: String, 28 | callback: FrogoUnityAdInitializationCallback? = null 29 | ) 30 | 31 | fun showUnityAdInterstitial( 32 | adInterstitialUnitId: String, 33 | callback: FrogoUnityAdInterstitialCallback? = null 34 | ) 35 | 36 | } -------------------------------------------------------------------------------- /ad-core/src/main/java/com/frogobox/adcore/util/FrogoAdFunc.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.adcore.util 2 | 3 | import com.frogobox.adcore.util.FrogoAdConstant.ADMOB_MOBILE_ADS_KEY 4 | import com.frogobox.adcore.util.FrogoAdConstant.LINE 5 | import com.frogobox.sdk.ext.showLogDebug 6 | 7 | 8 | /** 9 | * Created by faisalamir on 23/03/22 10 | * FrogoAdmob 11 | * ----------------------------------------- 12 | * Name : Muhammad Faisal Amir 13 | * E-mail : faisalamircs@gmail.com 14 | * Github : github.com/amirisback 15 | * ----------------------------------------- 16 | * Copyright (C) 2022 Frogobox Media Inc. 17 | * All rights reserved 18 | * 19 | */ 20 | 21 | 22 | object FrogoAdFunc { 23 | 24 | val TAG: String = FrogoAdFunc::class.java.simpleName 25 | 26 | fun getInitializedState(name: String, code: Int) { 27 | showLogDebug(LINE) 28 | showLogDebug("$TAG >> Setup MobileAds [Key] : $ADMOB_MOBILE_ADS_KEY") 29 | showLogDebug("$TAG >> Setup MobileAds [Initialization State Name] : $name") 30 | showLogDebug("$TAG >> Setup MobileAds [Initialization State Code] : $code") 31 | showLogDebug(LINE) 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/SampleAdmobApplication.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob 2 | 3 | import android.content.Context 4 | import com.frogobox.appadmob.di.repositoryModule 5 | import com.frogobox.appadmob.di.viewModelModule 6 | import com.frogobox.appadmob.util.AdHelper 7 | import org.koin.core.KoinApplication 8 | 9 | 10 | /** 11 | * Created by faisalamir on 19/04/22 12 | * FrogoAdmob 13 | * ----------------------------------------- 14 | * Name : Muhammad Faisal Amir 15 | * E-mail : faisalamircs@gmail.com 16 | * Github : github.com/amirisback 17 | * ----------------------------------------- 18 | * Copyright (C) 2022 Frogobox Media Inc. 19 | * All rights reserved 20 | * 21 | */ 22 | 23 | class SampleAdmobApplication : FrogoAdmobKoinApplication() { 24 | 25 | override fun setupKoinModule(koinApplication: KoinApplication) { 26 | koinApplication.modules(listOf(viewModelModule, repositoryModule)) 27 | } 28 | 29 | override fun onCreateExt() { 30 | super.onCreateExt() 31 | } 32 | 33 | override fun getAdOpenAppUnitId(context: Context?): String { 34 | return AdHelper.getAdOpenAppUnitId(context) 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/ui/FrogoAdmobActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.ui 2 | 3 | import com.frogobox.admob.delegate.AdmobDelegates 4 | import com.frogobox.admob.delegate.AdmobDelegatesImpl 5 | import com.frogobox.sdk.view.FrogoActivity 6 | 7 | /** 8 | * Created by Faisal Amir 9 | * FrogoBox Inc License 10 | * ========================================= 11 | * ImplementationAdmob 12 | * Copyright (C) 31/10/2019. 13 | * All rights reserved 14 | * ----------------------------------------- 15 | * Name : Muhammad Faisal Amir 16 | * E-mail : faisalamircs@gmail.com 17 | * Github : github.com/amirisback 18 | * LinkedIn : linkedin.com/in/faisalamircs 19 | * ----------------------------------------- 20 | * FrogoBox Software Industries 21 | * com.frogobox.admobhelper 22 | * 23 | */ 24 | 25 | 26 | abstract class FrogoAdmobActivity : FrogoActivity(), 27 | AdmobDelegates by AdmobDelegatesImpl() { 28 | 29 | companion object { 30 | val TAG: String = FrogoAdmobActivity::class.java.simpleName 31 | } 32 | override fun setupMonetized() { 33 | super.setupMonetized() 34 | setupAdmobDelegates(this) 35 | setupAdmobApp() 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /ad-unityad/src/main/java/com/frogobox/unityad/ui/FrogoUnityAdActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.unityad.ui 2 | 3 | import com.frogobox.sdk.view.FrogoActivity 4 | import com.frogobox.unityad.delegate.UnityAdDelegates 5 | import com.frogobox.unityad.delegate.UnityAdDelegatesImpl 6 | 7 | /** 8 | * Created by Faisal Amir 9 | * FrogoBox Inc License 10 | * ========================================= 11 | * ImplementationAdmob 12 | * Copyright (C) 31/10/2019. 13 | * All rights reserved 14 | * ----------------------------------------- 15 | * Name : Muhammad Faisal Amir 16 | * E-mail : faisalamircs@gmail.com 17 | * Github : github.com/amirisback 18 | * LinkedIn : linkedin.com/in/faisalamircs 19 | * ----------------------------------------- 20 | * FrogoBox Software Industries 21 | * com.frogobox.admobhelper 22 | * 23 | */ 24 | 25 | 26 | abstract class FrogoUnityAdActivity : FrogoActivity(), 27 | UnityAdDelegates by UnityAdDelegatesImpl() { 28 | 29 | companion object { 30 | val TAG: String = FrogoUnityAdActivity::class.java.simpleName 31 | } 32 | 33 | override fun setupMonetized() { 34 | super.setupMonetized() 35 | setupUnityAdDelegates(this) 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /app/src/main/assets/monetize_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "testAdmobAppId": "ca-app-pub-3940256099942544~3347511713", 3 | "testAdmobBanner": "ca-app-pub-3940256099942544/6300978111", 4 | "testAdmobInterstitial": "ca-app-pub-3940256099942544/1033173712", 5 | "testAdmobRewarded": "ca-app-pub-3940256099942544/5224354917", 6 | "admobAppId": "ca-app-pub-3940256099942544~3347511713", 7 | "admobBannerID": [ 8 | "ca-app-pub-3940256099942544/6300978111", 9 | "ca-app-pub-3940256099942544/6300978111", 10 | "ca-app-pub-3940256099942544/6300978111" 11 | ], 12 | "admobInterstitialID": [ 13 | "ca-app-pub-3940256099942544/1033173712", 14 | "ca-app-pub-3940256099942544/1033173712", 15 | "ca-app-pub-3940256099942544/1033173712" 16 | ], 17 | "admobRewardedID": [ 18 | "ca-app-pub-3940256099942544/5224354917", 19 | "ca-app-pub-3940256099942544/5224354917", 20 | "ca-app-pub-3940256099942544/5224354917" 21 | ], 22 | "unityGameID": "4416083", 23 | "unityInterstitialID": [ 24 | "Interstitial_Android", 25 | "", 26 | "Interstitial_Android" 27 | ], 28 | "unityBannerId": [ 29 | "", 30 | "", 31 | "" 32 | ], 33 | "unityRewardedID": [ 34 | "", 35 | "", 36 | "" 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /ad-unityad/src/main/java/com/frogobox/unityad/core/IFrogoUnityAd.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.unityad.core 2 | 3 | import android.app.Activity 4 | import android.content.Context 5 | import com.frogobox.unityad.callback.FrogoUnityAdInitializationCallback 6 | import com.frogobox.unityad.callback.FrogoUnityAdInterstitialCallback 7 | 8 | /** 9 | * Created by faisalamir on 22/03/22 10 | * FrogoAdmob 11 | * ----------------------------------------- 12 | * Name : Muhammad Faisal Amir 13 | * E-mail : faisalamircs@gmail.com 14 | * Github : github.com/amirisback 15 | * ----------------------------------------- 16 | * Copyright (C) 2022 Frogobox Media Inc. 17 | * All rights reserved 18 | * 19 | */ 20 | 21 | 22 | interface IFrogoUnityAd { 23 | 24 | fun setupUnityAdApp( 25 | context: Context, 26 | testMode: Boolean, 27 | unityGameId: String, 28 | callback: FrogoUnityAdInitializationCallback? = null 29 | ) 30 | 31 | // --------------------------------------------------------------------------------------------- 32 | 33 | fun showAdInterstitial( 34 | activity: Activity, 35 | adInterstitialUnitId: String, 36 | callback: FrogoUnityAdInterstitialCallback? = null 37 | ) 38 | 39 | } -------------------------------------------------------------------------------- /ad-core/src/main/java/com/frogobox/adcore/source/FrogoAdmobDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.adcore.source 2 | 3 | import android.content.Context 4 | import com.frogobox.adcore.model.FrogoAdmobId 5 | import com.frogobox.adcore.model.FrogoMonetizeId 6 | import com.frogobox.adcore.model.FrogoUnityId 7 | 8 | /** 9 | * Created by faisalamir on 02/03/22 10 | * FrogoAdmob 11 | * ----------------------------------------- 12 | * Name : Muhammad Faisal Amir 13 | * E-mail : faisalamircs@gmail.com 14 | * Github : github.com/amirisback 15 | * ----------------------------------------- 16 | * Copyright (C) 2022 Frogobox Media Inc. 17 | * All rights reserved 18 | * 19 | */ 20 | 21 | 22 | interface FrogoAdmobDataSource { 23 | 24 | // Switch For Using OkHttpClient Interceptor 25 | fun usingClient(context: Context) 26 | 27 | // Callback Get FrogoAdmobId 28 | fun getFrogoAdmobId(jsonFileName: String, callback: FrogoAdmobApiResponse) 29 | 30 | // Callback Get FrogoMonetizeId 31 | fun getFrogoMonetizeId(jsonFileName: String, callback: FrogoAdmobApiResponse) 32 | 33 | // Callback Get FrogoUnityId 34 | fun getFrogoUnityId(jsonFileName: String, callback: FrogoAdmobApiResponse) 35 | 36 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/di/RepositoryModule.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.di 2 | 3 | import com.frogobox.appadmob.source.AdmobLocalDataSource 4 | import com.frogobox.appadmob.source.AdmobRemoteDataSource 5 | import com.frogobox.appadmob.source.AdmobRepository 6 | import com.frogobox.sdk.delegate.preference.PreferenceDelegatesImpl 7 | import com.frogobox.sdk.util.AppExecutors 8 | import org.koin.android.ext.koin.androidContext 9 | import org.koin.dsl.module 10 | 11 | 12 | /** 13 | * Created by faisalamir on 19/04/22 14 | * FrogoAdmob 15 | * ----------------------------------------- 16 | * Name : Muhammad Faisal Amir 17 | * E-mail : faisalamircs@gmail.com 18 | * Github : github.com/amirisback 19 | * ----------------------------------------- 20 | * Copyright (C) 2022 Frogobox Media Inc. 21 | * All rights reserved 22 | * 23 | */ 24 | 25 | val repositoryModule = module { 26 | 27 | single { 28 | PreferenceDelegatesImpl(androidContext(), "com_frogobox_appadmob") 29 | } 30 | 31 | single { 32 | AdmobLocalDataSource(AppExecutors(), get()) 33 | } 34 | 35 | single { 36 | AdmobRemoteDataSource() 37 | } 38 | 39 | single { 40 | AdmobRepository(get(), get()) 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /ad-general/src/main/java/com/frogobox/ad/ui/AdActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.ad.ui 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.frogobox.ad.delegate.FrogoAdDelegates 6 | import com.frogobox.ad.delegate.FrogoAdDelegatesImpl 7 | import com.frogobox.admob.delegate.AdmobDelegates 8 | import com.frogobox.admob.delegate.AdmobDelegatesImpl 9 | import com.frogobox.unityad.delegate.UnityAdDelegates 10 | import com.frogobox.unityad.delegate.UnityAdDelegatesImpl 11 | 12 | /** 13 | * Created by Faisal Amir on 07/02/23 14 | * https://github.com/amirisback 15 | */ 16 | 17 | 18 | abstract class AdActivity : AppCompatActivity(), 19 | AdmobDelegates by AdmobDelegatesImpl(), 20 | UnityAdDelegates by UnityAdDelegatesImpl(), 21 | FrogoAdDelegates by FrogoAdDelegatesImpl() { 22 | 23 | companion object { 24 | val TAG: String = AdActivity::class.java.simpleName 25 | } 26 | 27 | open fun setupMonetized() { 28 | setupAdmobDelegates(this) 29 | setupAdmobApp() 30 | } 31 | 32 | open fun setupContentView() {} 33 | 34 | override fun onCreate(savedInstanceState: Bundle?) { 35 | super.onCreate(savedInstanceState) 36 | setupContentView() 37 | setupMonetized() 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /ad-core/src/main/java/com/frogobox/adcore/source/FrogoAdmobApiService.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.adcore.source 2 | 3 | import com.frogobox.adcore.model.FrogoAdmobId 4 | import com.frogobox.adcore.model.FrogoMonetizeId 5 | import com.frogobox.adcore.model.FrogoUnityId 6 | import io.reactivex.rxjava3.core.Observable 7 | import retrofit2.http.GET 8 | import retrofit2.http.Path 9 | 10 | 11 | /** 12 | * Created by faisalamir on 02/03/22 13 | * FrogoAdmob 14 | * ----------------------------------------- 15 | * Name : Muhammad Faisal Amir 16 | * E-mail : faisalamircs@gmail.com 17 | * Github : github.com/amirisback 18 | * ----------------------------------------- 19 | * Copyright (C) 2022 Frogobox Media Inc. 20 | * All rights reserved 21 | * 22 | */ 23 | 24 | 25 | interface FrogoAdmobApiService { 26 | 27 | @GET("{json-file-name}") 28 | fun getFrogoAdmobId( 29 | @Path("json-file-name") jsonFileName: String 30 | ): Observable 31 | 32 | @GET("{json-file-name}") 33 | fun getMonetizeId( 34 | @Path("json-file-name") jsonFileName: String 35 | ): Observable 36 | 37 | @GET("{json-file-name}") 38 | fun getUnityId( 39 | @Path("json-file-name") jsonFileName: String 40 | ): Observable 41 | 42 | } -------------------------------------------------------------------------------- /ad-unityad/src/main/java/com/frogobox/unityad/ui/FrogoUnityAdBindActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.unityad.ui 2 | 3 | import androidx.viewbinding.ViewBinding 4 | import com.frogobox.sdk.view.FrogoBindActivity 5 | import com.frogobox.unityad.delegate.UnityAdDelegates 6 | import com.frogobox.unityad.delegate.UnityAdDelegatesImpl 7 | 8 | /** 9 | * Created by Faisal Amir 10 | * FrogoBox Inc License 11 | * ========================================= 12 | * ImplementationAdmob 13 | * Copyright (C) 31/10/2019. 14 | * All rights reserved 15 | * ----------------------------------------- 16 | * Name : Muhammad Faisal Amir 17 | * E-mail : faisalamircs@gmail.com 18 | * Github : github.com/amirisback 19 | * LinkedIn : linkedin.com/in/faisalamircs 20 | * ----------------------------------------- 21 | * FrogoBox Software Industries 22 | * com.frogobox.admobhelper 23 | * 24 | */ 25 | 26 | 27 | abstract class FrogoUnityAdBindActivity : FrogoBindActivity(), 28 | UnityAdDelegates by UnityAdDelegatesImpl() { 29 | 30 | companion object { 31 | val TAG: String = FrogoUnityAdBindActivity::class.java.simpleName 32 | } 33 | 34 | override fun setupMonetized() { 35 | super.setupMonetized() 36 | setupUnityAdDelegates(this) 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /ad-core/src/main/java/com/frogobox/adcore/util/FrogoAdConstant.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.adcore.util 2 | 3 | /** 4 | * Created by Faisal Amir 5 | * ========================================= 6 | * FrogoRecyclerViewAdapter 7 | * Copyright (C) 26/04/2020. 8 | * All rights reserved 9 | * ----------------------------------------- 10 | * Name : Muhammad Faisal Amir 11 | * E-mail : faisalamircs@gmail.com 12 | * Github : github.com/amirisback 13 | * ----------------------------------------- 14 | * FrogoBox Inc 15 | * com.frogobox.frogoadmobhelper.util 16 | * 17 | */ 18 | 19 | 20 | object FrogoAdConstant { 21 | 22 | // Divider Admob 23 | const val RECYCLER_VIEW_ITEMS_PER_AD = 24 | 4 // A banner ad is placed in every 8th position in the RecyclerView. 25 | const val RECYCLER_VIEW_TYPE_MENU_ITEM = 0 // A menu item view type. 26 | const val RECYCLER_VIEW_TYPE_BANNER_AD = 1 // The banner ad view type. 27 | 28 | const val BASE_URL_SERVER = "https://raw.githubusercontent.com/" 29 | 30 | const val GITHUB_ACCOUNT = "https://github.com/amirisback" 31 | 32 | const val LINE = 33 | "------------------------------------------------------------------------------------------------" 34 | 35 | const val ADMOB_MOBILE_ADS_KEY = "com.google.android.gms.ads.MobileAds" 36 | 37 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx4608m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official 22 | 23 | android.nonTransitiveRClass=false 24 | android.nonFinalResIds=false -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/widget/FrogoAdmobViewHolder.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.widget 2 | 3 | import android.view.View 4 | import android.view.ViewGroup 5 | import com.frogobox.recycler.core.FrogoRecyclerViewHolder 6 | import com.google.android.gms.ads.AdView 7 | 8 | /** 9 | * Created by Faisal Amir 10 | * FrogoBox Inc License 11 | * ========================================= 12 | * SpeechBooster 13 | * Copyright (C) 10/09/2019. 14 | * All rights reserved 15 | * ----------------------------------------- 16 | * Name : Muhammad Faisal Amir 17 | * E-mail : faisalamircs@gmail.com 18 | * Github : github.com/amirisback 19 | * LinkedIn : linkedin.com/in/faisalamircs 20 | * ----------------------------------------- 21 | * FrogoBox Software Industries 22 | * 23 | * 24 | */ 25 | 26 | 27 | abstract class FrogoAdmobViewHolder(view: View) : FrogoRecyclerViewHolder(view) { 28 | 29 | fun bindItemAdView(data: T) { 30 | val adView = data as AdView 31 | val adCardView = itemView as ViewGroup 32 | 33 | if (adCardView.childCount > 0) { 34 | adCardView.removeAllViews() 35 | } 36 | if (adView.parent != null) { 37 | (adView.parent as ViewGroup).removeView(adView) 38 | } 39 | 40 | adCardView.addView(adView) 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/FrogoKoinApplication.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob 2 | 3 | import com.frogobox.sdk.FrogoApplication 4 | import org.koin.android.ext.koin.androidContext 5 | import org.koin.android.ext.koin.androidLogger 6 | import org.koin.core.KoinApplication 7 | import org.koin.core.context.startKoin 8 | import org.koin.core.logger.Level 9 | 10 | 11 | /** 12 | * Created by faisalamir on 26/07/21 13 | * FrogoSDK 14 | * ----------------------------------------- 15 | * Name : Muhammad Faisal Amir 16 | * E-mail : faisalamircs@gmail.com 17 | * Github : github.com/amirisback 18 | * ----------------------------------------- 19 | * Copyright (C) 2021 FrogoBox Inc. 20 | * All rights reserved 21 | * 22 | */ 23 | 24 | abstract class FrogoKoinApplication : FrogoApplication() { 25 | 26 | open fun setupKoinModule(koinApplication: KoinApplication) {} 27 | 28 | override fun onCreateExt() { 29 | super.onCreateExt() 30 | startKoin { 31 | androidContext(this@FrogoKoinApplication) 32 | androidLogger( 33 | if (isDebugMode()) { 34 | Level.DEBUG 35 | } else { 36 | Level.ERROR 37 | } 38 | ) 39 | setupKoinModule(this) 40 | } 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 27 | -------------------------------------------------------------------------------- /ad-admob/src/main/java/com/frogobox/admob/core/IFrogoAdmob.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.admob.core 2 | 3 | import android.content.Context 4 | 5 | /** 6 | * Created by Faisal Amir 7 | * FrogoBox Inc License 8 | * ========================================= 9 | * ImplementationAdmob 10 | * Copyright (C) 10/02/2020. 11 | * All rights reserved 12 | * ----------------------------------------- 13 | * Name : Muhammad Faisal Amir 14 | * E-mail : faisalamircs@gmail.com 15 | * Github : github.com/amirisback 16 | * LinkedIn : linkedin.com/in/faisalamircs 17 | * ----------------------------------------- 18 | * FrogoBox Software Industries 19 | * com.frogobox.admob 20 | * 21 | */ 22 | 23 | 24 | interface IFrogoAdmob { 25 | 26 | fun setupAdmobApp(context: Context) 27 | 28 | // --------------------------------------------------------------------------------------------- 29 | 30 | fun loadRecyclerBannerAds( 31 | bannerAdUnitId: String, 32 | context: Context, 33 | recyclerViewDataList: MutableList 34 | ) 35 | 36 | fun addBannerAds( 37 | bannerAdUnitId: String, 38 | context: Context, 39 | recyclerViewDataList: MutableList 40 | ) 41 | 42 | fun loadBannerAd(recyclerViewDataList: MutableList, index: Int) 43 | 44 | // --------------------------------------------------------------------------------------------- 45 | 46 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/mvvm/news/NewsAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.mvvm.news 2 | 3 | import android.view.ViewGroup 4 | import com.frogobox.admob.widget.AdmobViewHolder 5 | import com.frogobox.admob.widget.FrogoAdmobViewAdapter 6 | import com.frogobox.admob.widget.FrogoAdmobViewHolder 7 | import com.frogobox.admob.widget.IFrogoAdmobViewAdapter 8 | import com.frogobox.appadmob.R 9 | 10 | /** 11 | * Created by Faisal Amir 12 | * FrogoBox Inc License 13 | * ========================================= 14 | * ImplementationAdmob 15 | * Copyright (C) 27/11/2019. 16 | * All rights reserved 17 | * ----------------------------------------- 18 | * Name : Muhammad Faisal Amir 19 | * E-mail : faisalamircs@gmail.com 20 | * Github : github.com/amirisback 21 | * LinkedIn : linkedin.com/in/faisalamircs 22 | * ----------------------------------------- 23 | * FrogoBox Software Industries 24 | * com.frogobox.admobhelper.ui.adapter 25 | * 26 | */ 27 | class NewsAdapter : FrogoAdmobViewAdapter() { 28 | 29 | init { 30 | viewCallback = object : IFrogoAdmobViewAdapter { 31 | override fun onViewTypeMenuItem(parent: ViewGroup): FrogoAdmobViewHolder { 32 | return NewsHolder(viewLayout(parent)) 33 | } 34 | 35 | override fun onViewTypeBannerAds(parent: ViewGroup): FrogoAdmobViewHolder { 36 | return AdmobViewHolder(viewLayout(parent, R.layout.content_item_ad_banner)) 37 | } 38 | } 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/mvvm/movie/MovieAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.mvvm.movie 2 | 3 | import android.view.ViewGroup 4 | import com.frogobox.admob.widget.AdmobViewHolder 5 | import com.frogobox.admob.widget.FrogoAdmobViewAdapter 6 | import com.frogobox.admob.widget.FrogoAdmobViewHolder 7 | import com.frogobox.admob.widget.IFrogoAdmobViewAdapter 8 | import com.frogobox.appadmob.R 9 | 10 | /** 11 | * Created by Faisal Amir 12 | * FrogoBox Inc License 13 | * ========================================= 14 | * ImplementationAdmob 15 | * Copyright (C) 27/11/2019. 16 | * All rights reserved 17 | * ----------------------------------------- 18 | * Name : Muhammad Faisal Amir 19 | * E-mail : faisalamircs@gmail.com 20 | * Github : github.com/amirisback 21 | * LinkedIn : linkedin.com/in/faisalamircs 22 | * ----------------------------------------- 23 | * FrogoBox Software Industries 24 | * com.frogobox.admobhelper.ui.adapter 25 | * 26 | */ 27 | class MovieAdapter : FrogoAdmobViewAdapter() { 28 | 29 | init { 30 | viewCallback = object : IFrogoAdmobViewAdapter { 31 | override fun onViewTypeMenuItem(parent: ViewGroup): FrogoAdmobViewHolder { 32 | return MovieHolder(viewLayout(parent)) 33 | } 34 | 35 | override fun onViewTypeBannerAds(parent: ViewGroup): FrogoAdmobViewHolder { 36 | return AdmobViewHolder(viewLayout(parent, R.layout.content_item_ad_banner)) 37 | } 38 | } 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/appadmob/mvvm/news/NewsHolder.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.appadmob.mvvm.news 2 | 3 | import android.view.View 4 | import android.widget.ImageView 5 | import android.widget.TextView 6 | import com.bumptech.glide.Glide 7 | import com.frogobox.admob.widget.FrogoAdmobViewHolder 8 | import com.frogobox.appadmob.R 9 | import com.frogobox.coreutil.news.model.Article 10 | import com.frogobox.recycler.core.FrogoRecyclerNotifyListener 11 | 12 | /** 13 | * Created by Faisal Amir on 31/01/2021 14 | * AdmobSamples Source Code 15 | * ----------------------------------------- 16 | * Name : Muhammad Faisal Amir 17 | * E-mail : faisalamircs@gmail.com 18 | * Github : github.com/amirisback 19 | * ----------------------------------------- 20 | * Copyright (C) 2021 FrogoBox Inc. 21 | * All rights reserved 22 | * 23 | */ 24 | class NewsHolder(view: View) : FrogoAdmobViewHolder(view) { 25 | 26 | private val tv_name = view.findViewById(R.id.tv_name) 27 | private val tv_type = view.findViewById(R.id.tv_type) 28 | private val iv_poster = view.findViewById(R.id.iv_poster) 29 | 30 | override fun initComponent( 31 | data: Any, 32 | position: Int, 33 | notifyListener: FrogoRecyclerNotifyListener 34 | ) { 35 | val article = data as Article 36 | Glide.with(itemView.context).load(article.urlToImage).into(iv_poster) 37 | tv_name.text = article.title 38 | tv_type.text = article.description 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_app_open_ad.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 17 | 18 | 23 | 24 |