-
Notifications
You must be signed in to change notification settings - Fork 200
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
Adapter for Maio SDK v2.0.0 #529
Conversation
Hello @7pairs thanks for the pull request. There was an update to bring unit tests to github and I was wondering if you could update your changes to get those tests running. Thanks in advance! |
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.
Gentle bump for last comment, also making it as a request change.
To continue with the review, can this PR be sync to the latest version? Thanks!
@LTPhantom |
@LTPhantom Unlike v1, v2 does not include classes like In v2, to display an ad, developers only need to load an ad with static methods provided by
Could you advise on the approach we should take to reconcile the implementation differences between v1 and v2? Going forward, we plan on discontinuing V1 and making all subsequent versions of our admob SDK adhere to V2 only (which is not backwards compatible with V1). Apart from fixing the tests, are there any other potential issues we need to fix to make the adapter only for V2 going forward? |
@7pairs |
@LTPhantom |
@LTPhantom |
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.
Thanks for cleaning up the tests. General code is looking good, we can look forward to submit after the last comments are addressed.
@@ -10,7 +10,7 @@ ext { | |||
// String property to store the proper name of the mediation network adapter. | |||
adapterName = "maio" | |||
// String property to store version name. | |||
stringVersion = "1.1.16.3" | |||
stringVersion = "2.0.0.0" |
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.
Can you also update the versionCode
below to 2000000
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.
I have fixed it, as you suggested.
In addition, the SDK version has been updated to 2.0.3.
} | ||
} | ||
this.maioRewarded = Rewarded.loadAd(new MaioRequest(zoneID, | ||
mediationRewardedAdConfiguration.isTestRequest(), ""), context, new IRewardedLoadCallback() { |
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.
Since the third parameter of the MaioRequest constructor is an empty string, can you add the name of the parameter in the constructor call to give more clarity? Something like ClassName(/*paramName=/* "")
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.
I have fixed it, as you suggested.
@@ -35,18 +35,24 @@ | |||
import java.lang.annotation.RetentionPolicy; | |||
import java.util.HashSet; | |||
import java.util.List; | |||
import jp.maio.sdk.android.FailNotificationReason; | |||
import jp.maio.sdk.android.MaioAds; | |||
|
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.
nit: Remove empty line
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.
I have fixed it, as you suggested.
@@ -21,23 +21,28 @@ | |||
import android.util.Log; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import com.google.ads.mediation.maio.MaioAdsManagerListener; | |||
|
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.
nit: Remove empty line. Same on line 30.
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.
I have fixed it, as you suggested.
} | ||
}); | ||
this.maioInterstitial = jp.maio.sdk.android.v2.interstitial.Interstitial.loadAd( | ||
new MaioRequest(zoneID, mediationAdRequest.isTesting(), ""), context, new IInterstitialLoadCallback() { |
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.
Same as in the MaioMediationAdapter
comment, can you add the name of the parameter?
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.
I have fixed it, as you suggested.
// Copyright 2019 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
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.
Please keep the License header.
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.
I have fixed it, as you suggested.
Unit tests seem to be failing, it seems related to |
@LTPhantom |
Update Maio adapter to call Maio SDK v2.0.0.