-
-
Notifications
You must be signed in to change notification settings - Fork 16
Mediation support for android (except Chartboost) #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,3 +13,4 @@ builtins | |
| /debug.keystore.pass.txt | ||
| /.editor_settings | ||
| /.vscode | ||
| *.eclipse.buildship.core.prefs | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,98 @@ | ||
| // Auto-generated by updater/android.py. Do not edit by hand. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generator is the key here, it helps to reduce maintenance burden |
||
| repositories { | ||
| mavenCentral() | ||
| google() | ||
| {{#admob.chartboost_android}} | ||
| maven { url 'https://cboost.jfrog.io/artifactory/chartboost-ads/' } | ||
| {{/admob.chartboost_android}} | ||
| {{#admob.imobile_android}} | ||
| maven { url 'https://imobile.github.io/adnw-sdk-android'} | ||
| {{/admob.imobile_android}} | ||
| {{#admob.ironsource_android}} | ||
| maven { url 'https://android-sdk.is.com/'} | ||
| {{/admob.ironsource_android}} | ||
| {{#admob.maio_android}} | ||
| maven { url 'https://imobile-maio.github.io/maven'} | ||
| {{/admob.maio_android}} | ||
| {{#admob.mintegral_android}} | ||
| maven { url 'https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea'} | ||
| {{/admob.mintegral_android}} | ||
| {{#admob.pangle_android}} | ||
| maven { url 'https://artifact.bytedance.com/repository/pangle/'} | ||
| {{/admob.pangle_android}} | ||
| {{#admob.pubmatic_android}} | ||
| maven { url 'https://repo.pubmatic.com/artifactory/public-repos'} | ||
| {{/admob.pubmatic_android}} | ||
| } | ||
|
|
||
| dependencies { | ||
| // https://developers.google.com/admob/android/quick-start#example_app-level_buildgradle_excerpt | ||
| implementation "com.google.android.gms:play-services-ads:24.5.0" | ||
| implementation "com.google.android.gms:play-services-ads:24.9.0" | ||
| implementation "androidx.lifecycle:lifecycle-common:2.8.3" | ||
| implementation "androidx.lifecycle:lifecycle-process:2.8.3" | ||
| annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.8.3" | ||
|
|
||
| {{#admob.applovin_android}} | ||
| implementation 'com.google.ads.mediation:applovin:13.5.1.0' | ||
| {{/admob.applovin_android}} | ||
|
|
||
| {{#admob.chartboost_android}} | ||
| implementation 'com.google.ads.mediation:chartboost:9.11.0.0' | ||
| {{/admob.chartboost_android}} | ||
|
|
||
| {{#admob.dt_exchange_android}} | ||
| implementation 'com.google.ads.mediation:fyber:8.4.2.0' | ||
| {{/admob.dt_exchange_android}} | ||
|
|
||
| {{#admob.imobile_android}} | ||
| implementation 'com.google.ads.mediation:imobile:2.3.2.1' | ||
| {{/admob.imobile_android}} | ||
|
|
||
| {{#admob.inmobi_android}} | ||
| implementation 'com.google.ads.mediation:inmobi:11.1.0.0' | ||
| {{/admob.inmobi_android}} | ||
|
|
||
| {{#admob.ironsource_android}} | ||
| implementation 'com.google.ads.mediation:ironsource:9.2.0.0' | ||
| {{/admob.ironsource_android}} | ||
|
|
||
| {{#admob.liftoff_android}} | ||
| implementation 'com.google.ads.mediation:vungle:7.6.3.0' | ||
| {{/admob.liftoff_android}} | ||
|
|
||
| {{#admob.line_android}} | ||
| implementation 'com.google.ads.mediation:line:3.0.0.0' | ||
| {{/admob.line_android}} | ||
|
|
||
| {{#admob.maio_android}} | ||
| implementation 'com.google.ads.mediation:maio:2.0.8.0' | ||
| {{/admob.maio_android}} | ||
|
|
||
| {{#admob.meta_android}} | ||
| implementation 'com.google.ads.mediation:facebook:6.21.0.0' | ||
| {{/admob.meta_android}} | ||
|
|
||
| {{#admob.mintegral_android}} | ||
| implementation 'com.google.ads.mediation:mintegral:17.0.61.0' | ||
| {{/admob.mintegral_android}} | ||
|
|
||
| {{#admob.moloco_android}} | ||
| implementation 'com.google.ads.mediation:moloco:4.4.0.0' | ||
| {{/admob.moloco_android}} | ||
|
|
||
| {{#admob.mytarget_android}} | ||
| implementation 'com.google.ads.mediation:mytarget:5.27.4.0' | ||
| {{/admob.mytarget_android}} | ||
|
|
||
| {{#admob.pangle_android}} | ||
| implementation 'com.google.ads.mediation:pangle:7.8.5.2.0' | ||
| {{/admob.pangle_android}} | ||
|
|
||
| {{#admob.pubmatic_android}} | ||
| implementation 'com.google.ads.mediation:pubmatic:4.11.0.1' | ||
| {{/admob.pubmatic_android}} | ||
|
|
||
| {{#admob.unity_android}} | ||
| implementation 'com.unity3d.ads:unity-ads:4.16.5' | ||
| implementation 'com.google.ads.mediation:unity:4.16.5.0' | ||
| {{/admob.unity_android}} | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,67 @@ | ||
| # Auto-generated by updater/ios.py. Do not edit by hand. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I keep it here, because it will not be used anyways (without checkboxes in |
||
| platform :ios, '12.0' | ||
| pod 'Google-Mobile-Ads-SDK', '12.9.0' | ||
| pod 'Google-Mobile-Ads-SDK', '12.14.0' | ||
|
|
||
| {{#admob.applovin_ios}} | ||
| pod 'GoogleMobileAdsMediationAppLovin' | ||
| {{/admob.applovin_ios}} | ||
|
|
||
| {{#admob.chartboost_ios}} | ||
| pod 'GoogleMobileAdsMediationChartboost' | ||
| {{/admob.chartboost_ios}} | ||
|
|
||
| {{#admob.dt_exchange_ios}} | ||
| pod 'GoogleMobileAdsMediationFyber' | ||
| {{/admob.dt_exchange_ios}} | ||
|
|
||
| {{#admob.imobile_ios}} | ||
| pod 'GoogleMobileAdsMediationIMobile' | ||
| {{/admob.imobile_ios}} | ||
|
|
||
| {{#admob.inmobi_ios}} | ||
| pod 'GoogleMobileAdsMediationInMobi' | ||
| {{/admob.inmobi_ios}} | ||
|
|
||
| {{#admob.ironsource_ios}} | ||
| pod 'GoogleMobileAdsMediationIronSource' | ||
| {{/admob.ironsource_ios}} | ||
|
|
||
| {{#admob.liftoff_ios}} | ||
| pod 'GoogleMobileAdsMediationVungle' | ||
| {{/admob.liftoff_ios}} | ||
|
|
||
| {{#admob.line_ios}} | ||
| pod 'GoogleMobileAdsMediationLine' | ||
| {{/admob.line_ios}} | ||
|
|
||
| {{#admob.maio_ios}} | ||
| pod 'GoogleMobileAdsMediationMaio' | ||
| {{/admob.maio_ios}} | ||
|
|
||
| {{#admob.meta_ios}} | ||
| pod 'GoogleMobileAdsMediationFacebook' | ||
| {{/admob.meta_ios}} | ||
|
|
||
| {{#admob.mintegral_ios}} | ||
| pod 'GoogleMobileAdsMediationMintegral' | ||
| {{/admob.mintegral_ios}} | ||
|
|
||
| {{#admob.moloco_ios}} | ||
| pod 'GoogleMobileAdsMediationMoloco' | ||
| {{/admob.moloco_ios}} | ||
|
|
||
| {{#admob.mytarget_ios}} | ||
| pod 'GoogleMobileAdsMediationMyTarget' | ||
| {{/admob.mytarget_ios}} | ||
|
|
||
| {{#admob.pangle_ios}} | ||
| pod 'GoogleMobileAdsMediationPangle' | ||
| {{/admob.pangle_ios}} | ||
|
|
||
| {{#admob.pubmatic_ios}} | ||
| pod 'GoogleMobileAdsMediationPubMatic' | ||
| {{/admob.pubmatic_ios}} | ||
|
|
||
| {{#admob.unity_ios}} | ||
| pod 'GoogleMobileAdsMediationUnity' | ||
| {{/admob.unity_ios}} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -159,11 +159,16 @@ void Initialize_Ext(dmExtension::Params* params, const char* defoldUserAgent) | |
|
|
||
| InitJNIMethods(env, cls); | ||
|
|
||
| bool enableTestAds = false; | ||
| #ifdef DM_DEBUG | ||
| enableTestAds = dmConfigFile::GetInt(params->m_ConfigFile, "admob.test_ads_in_debug", 0) != 0; | ||
| #endif | ||
|
|
||
| const char* appOpenAdUnitId = dmConfigFile::GetString(params->m_ConfigFile, "admob.app_open_android", 0); | ||
| jstring jappOpenAdUnitId = env->NewStringUTF(appOpenAdUnitId); | ||
| jstring jdefoldUserAgent = env->NewStringUTF(defoldUserAgent); | ||
| jmethodID jni_constructor = env->GetMethodID(cls, "<init>", "(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)V"); | ||
| g_admob.m_AdmobJNI = env->NewGlobalRef(env->NewObject(cls, jni_constructor, threadAttacher.GetActivity()->clazz, jappOpenAdUnitId, jdefoldUserAgent)); | ||
| jmethodID jni_constructor = env->GetMethodID(cls, "<init>", "(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;Z)V"); | ||
| g_admob.m_AdmobJNI = env->NewGlobalRef(env->NewObject(cls, jni_constructor, threadAttacher.GetActivity()->clazz, jappOpenAdUnitId, jdefoldUserAgent, (jboolean)enableTestAds)); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. annoying to add more params, but it may initialize App Open AD there, so we need to do it before that |
||
| env->DeleteLocalRef(jappOpenAdUnitId); | ||
| env->DeleteLocalRef(jdefoldUserAgent); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zedadds such files when edit java