Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ThirdPartyAdapters/mintegral/mintegral/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ext {
// String property to store the proper name of the mediation network adapter.
adapterName = "Mintegral"
// String property to store version name.
stringVersion = "17.0.41.0"
stringVersion = "17.0.51.0"
// String property to store group id.
stringGroupId = "com.google.ads.mediation"
// Jacoco version to generate code coverage data
Expand Down Expand Up @@ -118,7 +118,7 @@ task jacocoTestReport(type: JacocoReport,
dependencies {
implementation 'com.google.android.gms:play-services-ads:24.9.0'
implementation 'androidx.annotation:annotation:1.5.0'
implementation 'com.mbridge.msdk.oversea:mbridge_android_sdk:17.0.41'
implementation 'com.mbridge.msdk.oversea:mbridge_android_sdk:17.0.51'

// Jacoco
implementation "org.jacoco:org.jacoco.core:$jacocoVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

package com.google.ads.mediation.mintegral

import android.app.Activity
import android.content.Context
import android.view.ViewGroup
import com.mbridge.msdk.newinterstitial.out.MBBidNewInterstitialHandler
Expand Down Expand Up @@ -102,6 +103,9 @@ object MintegralFactory {
override fun show() {
instance?.show()
}
override fun show(activity: Activity) {
instance?.show(activity)
}
}

@JvmStatic
Expand Down Expand Up @@ -132,6 +136,9 @@ object MintegralFactory {
override fun showFromBid() {
instance?.showFromBid()
}
override fun showFromBid(activity: Activity) {
instance?.showFromBid(activity)
}
}

@JvmStatic fun createMBBannerView(context: Context) = MBBannerView(context)
Expand Down Expand Up @@ -161,6 +168,9 @@ object MintegralFactory {
override fun show() {
instance?.show()
}
override fun show(activity: Activity) {
instance?.show(activity)
}
}

@JvmStatic
Expand Down Expand Up @@ -192,6 +202,9 @@ object MintegralFactory {
override fun showFromBid() {
instance?.showFromBid()
}
override fun showFromBid(activity: Activity) {
instance?.showFromBid(activity)
}
}
}

Expand Down Expand Up @@ -226,6 +239,7 @@ interface MintegralNewInterstitialAdWrapper {
fun playVideoMute(muteConstant: Int)

fun show()
fun show(activity: Activity)
}

interface MintegralBidNewInterstitialAdWrapper {
Expand All @@ -240,6 +254,7 @@ interface MintegralBidNewInterstitialAdWrapper {
fun playVideoMute(muteConstant: Int)

fun showFromBid()
fun showFromBid(activity: Activity)
}

interface MintegralRewardedAdWrapper {
Expand All @@ -253,6 +268,7 @@ interface MintegralRewardedAdWrapper {
fun playVideoMute(muteConstant: Int)

fun show()
fun show(activity: Activity)
}

interface MintegralBidRewardedAdWrapper {
Expand All @@ -268,4 +284,6 @@ interface MintegralBidRewardedAdWrapper {
fun playVideoMute(muteConstant: Int)

fun showFromBid()

fun showFromBid(activity: Activity)
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import static com.google.ads.mediation.mintegral.MintegralMediationAdapter.TAG;
import static com.google.ads.mediation.mintegral.MintegralMediationAdapter.loadedSlotIdentifiers;

import android.app.Activity;
import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
Expand Down Expand Up @@ -88,6 +89,10 @@ public void showAd(@NonNull Context context) {
muted
? MBridgeConstans.REWARD_VIDEO_PLAY_MUTE
: MBridgeConstans.REWARD_VIDEO_PLAY_NOT_MUTE);
mbBidNewInterstitialAdWrapper.showFromBid();
if(context instanceof Activity){
mbBidNewInterstitialAdWrapper.showFromBid((Activity)context);
}else {
mbBidNewInterstitialAdWrapper.showFromBid();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import static com.google.ads.mediation.mintegral.MintegralMediationAdapter.TAG;
import static com.google.ads.mediation.mintegral.MintegralMediationAdapter.loadedSlotIdentifiers;

import android.app.Activity;
import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
Expand Down Expand Up @@ -87,6 +88,10 @@ public void showAd(@NonNull Context context) {
muted
? MBridgeConstans.REWARD_VIDEO_PLAY_MUTE
: MBridgeConstans.REWARD_VIDEO_PLAY_NOT_MUTE);
mintegralBidRewardedAdWrapper.showFromBid();
if (context instanceof Activity) {
mintegralBidRewardedAdWrapper.showFromBid((Activity)context);
}else {
mintegralBidRewardedAdWrapper.showFromBid();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static com.google.ads.mediation.mintegral.MintegralConstants.ERROR_MSG_AD_ALREADY_LOADED;
import static com.google.ads.mediation.mintegral.MintegralMediationAdapter.loadedSlotIdentifiers;

import android.app.Activity;
import android.content.Context;
import androidx.annotation.NonNull;
import com.google.ads.mediation.mintegral.FlagValueGetter;
Expand Down Expand Up @@ -85,6 +86,10 @@ public void showAd(@NonNull Context context) {
muted
? MBridgeConstans.REWARD_VIDEO_PLAY_MUTE
: MBridgeConstans.REWARD_VIDEO_PLAY_NOT_MUTE);
mbNewInterstitialAdWrapper.show();
if (context instanceof Activity) {
mbNewInterstitialAdWrapper.show((Activity)context);
}else {
mbNewInterstitialAdWrapper.show();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static com.google.ads.mediation.mintegral.MintegralConstants.ERROR_MSG_AD_ALREADY_LOADED;
import static com.google.ads.mediation.mintegral.MintegralMediationAdapter.loadedSlotIdentifiers;

import android.app.Activity;
import android.content.Context;
import androidx.annotation.NonNull;
import com.google.ads.mediation.mintegral.FlagValueGetter;
Expand Down Expand Up @@ -84,6 +85,10 @@ public void showAd(@NonNull Context context) {
muted
? MBridgeConstans.REWARD_VIDEO_PLAY_MUTE
: MBridgeConstans.REWARD_VIDEO_PLAY_NOT_MUTE);
mintegralRewardedAdWrapper.show();
if(context instanceof Activity){
mintegralRewardedAdWrapper.show((Activity)context);
}else {
mintegralRewardedAdWrapper.show();
}
}
}
Loading