Conversation
|
Please also add some information to the documentation about the complexities of configuring and testing adapters (I'm thinking of your comments here: https://forum.defold.com/t/admob-mediation-bidding-in-defold-are-we-limited-to-a-small-set-of-supported-networks/82239/5?u=britzl) |
|
@britzl this PR is ready for review. For now only Android |
| /debug.keystore.pass.txt | ||
| /.editor_settings | ||
| /.vscode | ||
| *.eclipse.buildship.core.prefs |
There was a problem hiding this comment.
zed adds such files when edit java
| @@ -1,11 +1,98 @@ | |||
| // Auto-generated by updater/android.py. Do not edit by hand. | |||
There was a problem hiding this comment.
Generator is the key here, it helps to reduce maintenance burden
| @@ -1,2 +1,67 @@ | |||
| # Auto-generated by updater/ios.py. Do not edit by hand. | |||
There was a problem hiding this comment.
I keep it here, because it will not be used anyways (without checkboxes in game.project I removed from ext.properties)
| 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)); |
There was a problem hiding this comment.
annoying to add more params, but it may initialize App Open AD there, so we need to do it before that
| Log.d(TAG, "Test ads enabled for this device: " + (deviceId != null ? deviceId : "unknown")); | ||
| } | ||
|
|
||
| private String getHashedDeviceId() { |
There was a problem hiding this comment.
I'm not sure if we will be able to do so for ios, for android it is possible just to get ID of the device itself and make it test device - the only way to test mediation
| sendSimpleMessage(MSG_INITIALIZATION, EVENT_COMPLETE); | ||
| } | ||
| }); | ||
| new Thread(new Runnable() { |
There was a problem hiding this comment.
it's recommended in the official manual to do it in a separate thread : https://developers.google.com/admob/android/mediation
| }).start(); | ||
| } | ||
|
|
||
| private void logAdapterStatus(InitializationStatus initializationStatus) { |
There was a problem hiding this comment.
I expected it to show useful information - such a naive guy ...
| @@ -0,0 +1,322 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
For me these scripts is mediations support, there rest is just a bonus to make it easier to test it etc
To reduce scope of the issue I decided to ship Android support for now (except Chartboost, because it's blocked by defold/extender#385)
Partially implements support for this task #31