改为topon
This commit is contained in:
parent
e4864a6adc
commit
725fdd8fd5
BIN
.safedk/api/SafeDKAndroid-6.5.2.jar
Normal file
BIN
.safedk/api/SafeDKAndroid-6.5.2.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
.safedk/dex/SafeDKAndroid-6.5.2.dex
Normal file
BIN
.safedk/dex/SafeDKAndroid-6.5.2.dex
Normal file
Binary file not shown.
@ -4,15 +4,12 @@ import java.text.SimpleDateFormat
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
id("applovin-quality-service")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id ("kotlin-kapt")
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
}
|
||||
applovin{
|
||||
apiKey = "C8XiiEAUrUDh6nWnlsJz8iEhrTyNLUctJ_xGloqZJHwJINes1b_Md0rTpgbdETXAq9eH5RVsJqqNTILCA2qnbA"
|
||||
}
|
||||
|
||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||
|
||||
|
||||
@ -28,8 +25,8 @@ android {
|
||||
applicationId = "com.sound.prankparty"
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
versionCode = 13
|
||||
versionName = "1.0.4"
|
||||
versionCode = 14
|
||||
versionName = "1.0.5"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@ -77,16 +74,95 @@ dependencies {
|
||||
implementation("com.google.firebase:firebase-crashlytics-ktx")
|
||||
|
||||
|
||||
//--------------------------MAX(Liftoff Monetize(vungle)、Mintegral、Pangle、Unity Ads、inmobi)
|
||||
implementation("com.applovin:applovin-sdk:+")
|
||||
implementation("com.applovin.mediation:vungle-adapter:+")
|
||||
implementation("com.applovin.mediation:mintegral-adapter:+")
|
||||
implementation("com.applovin.mediation:bytedance-adapter:+")
|
||||
implementation("com.applovin.mediation:unityads-adapter:+")
|
||||
//-----------------------------------------------TopOn(Mintegral、Pangle、UnitAds、Digital Turbine(Fyber)、Chartboost&Helium、Ironsource、Liftoff(Vungle)、Inmobi、Start.io、Appnext、Bigo)
|
||||
|
||||
implementation("com.applovin.mediation:inmobi-adapter:+")
|
||||
implementation("com.squareup.picasso:picasso:2.71828")
|
||||
//Anythink (Necessary)
|
||||
implementation("com.anythink.sdk:core-tpn:6.4.07")
|
||||
implementation("com.anythink.sdk:nativead-tpn:6.4.07")
|
||||
implementation("com.anythink.sdk:banner-tpn:6.4.07")
|
||||
implementation("com.anythink.sdk:interstitial-tpn:6.4.07")
|
||||
implementation("com.anythink.sdk:rewardedvideo-tpn:6.4.07")
|
||||
implementation("com.anythink.sdk:splash-tpn:6.4.07")
|
||||
|
||||
//Androidx (Necessary)
|
||||
implementation("androidx.appcompat:appcompat:1.1.0")
|
||||
implementation("androidx.browser:browser:1.4.0")
|
||||
|
||||
//StartApp
|
||||
implementation("com.anythink.sdk:adapter-tpn-startapp:6.4.07")
|
||||
implementation("com.startapp:inapp-sdk:5.0.2")
|
||||
|
||||
//Appnext
|
||||
implementation("com.anythink.sdk:adapter-tpn-appnext:6.4.07")
|
||||
implementation("com.appnext.sdk:ads:2.7.1.473")
|
||||
implementation("com.appnext.sdk:banners:2.7.1.473")
|
||||
implementation("com.appnext.sdk:native-ads2:2.7.1.473")
|
||||
implementation("com.appnext.sdk:actions:2.4.6.472")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.0.4")
|
||||
|
||||
//Vungle
|
||||
implementation("com.anythink.sdk:adapter-tpn-vungle:6.4.07")
|
||||
implementation("com.vungle:vungle-ads:7.4.0")
|
||||
implementation("com.google.android.gms:play-services-basement:18.1.0")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
|
||||
//UnityAds
|
||||
implementation("com.anythink.sdk:adapter-tpn-unityads:6.4.07")
|
||||
implementation("com.unity3d.ads:unity-ads:4.12.2")
|
||||
|
||||
//Ironsource
|
||||
implementation("com.anythink.sdk:adapter-tpn-ironsource:6.4.07")
|
||||
implementation("com.ironsource.sdk:mediationsdk:8.2.1")
|
||||
implementation("com.google.android.gms:play-services-appset:16.0.2")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
implementation("com.google.android.gms:play-services-basement:18.1.0")
|
||||
|
||||
//Bigo
|
||||
implementation("com.anythink.sdk:adapter-tpn-bigo:6.4.07")
|
||||
implementation("com.bigossp:bigo-ads:4.9.0")
|
||||
|
||||
//Pangle
|
||||
implementation("com.anythink.sdk:adapter-tpn-pangle-nonchina:6.4.07")
|
||||
implementation("com.pangle.global:ads-sdk:6.1.0.9")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
|
||||
//Inmobi
|
||||
implementation("com.anythink.sdk:adapter-tpn-inmobi:6.4.07")
|
||||
implementation("com.inmobi.monetization:inmobi-ads-kotlin:10.7.5")
|
||||
|
||||
//Mintegral
|
||||
implementation("com.anythink.sdk:adapter-tpn-mintegral-nonchina:6.4.07")
|
||||
implementation("com.mbridge.msdk.oversea:reward:16.8.11")
|
||||
implementation("com.mbridge.msdk.oversea:newinterstitial:16.8.11")
|
||||
implementation("com.mbridge.msdk.oversea:mbnative:16.8.11")
|
||||
implementation("com.mbridge.msdk.oversea:mbnativeadvanced:16.8.11")
|
||||
implementation("com.mbridge.msdk.oversea:mbsplash:16.8.11")
|
||||
implementation("com.mbridge.msdk.oversea:mbbanner:16.8.11")
|
||||
implementation("com.mbridge.msdk.oversea:mbbid:16.8.11")
|
||||
implementation("androidx.recyclerview:recyclerview:1.1.0")
|
||||
//MAX
|
||||
|
||||
//Chartboost
|
||||
implementation("com.anythink.sdk:adapter-tpn-chartboost:6.4.07")
|
||||
implementation("com.chartboost:chartboost-sdk:9.7.0")
|
||||
implementation("com.chartboost:chartboost-mediation-sdk:4.9.1")
|
||||
implementation("com.chartboost:chartboost-mediation-adapter-chartboost:4.9.7.0.0")
|
||||
implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0")
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:4.10.0")
|
||||
implementation("com.squareup.okhttp3:okhttp:4.10.0")
|
||||
implementation("com.squareup.retrofit2:converter-scalars:2.9.0")
|
||||
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
|
||||
|
||||
//Fyber
|
||||
implementation("com.anythink.sdk:adapter-tpn-fyber:6.4.07")
|
||||
implementation("com.fyber:marketplace-sdk:8.3.0")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
|
||||
// Debugger UI Tools
|
||||
//implementation ("com.anythink.sdk:debugger-ui:1.1.0")
|
||||
|
||||
//----------------------------------------------TopOn
|
||||
|
||||
|
||||
}
|
||||
129
app/proguard-rules.pro
vendored
129
app/proguard-rules.pro
vendored
@ -39,3 +39,132 @@
|
||||
|
||||
# 额外的保留规则,确保任何使用 Room 的地方都能正常工作
|
||||
-keep class androidx.room.** { *; }
|
||||
|
||||
#---------------------------------------------Topon
|
||||
-keep class com.startapp.** {
|
||||
*;
|
||||
}
|
||||
|
||||
-keep class com.truenet.** {
|
||||
*;
|
||||
}
|
||||
|
||||
-keepattributes Exceptions, InnerClasses, Signature, Deprecated, SourceFile,
|
||||
LineNumberTable, *Annotation*, EnclosingMethod
|
||||
-dontwarn android.webkit.JavascriptInterface
|
||||
-dontwarn com.startapp.**
|
||||
|
||||
-dontwarn org.jetbrains.annotations.**
|
||||
-keep class com.appnext.** { *; }
|
||||
-dontwarn com.appnext.**
|
||||
# Vungle
|
||||
-dontwarn com.vungle.ads.**
|
||||
-keepclassmembers class com.vungle.ads.** {
|
||||
*;
|
||||
}
|
||||
-keep class com.vungle.ads.**
|
||||
|
||||
|
||||
|
||||
# Google
|
||||
-keep class com.google.android.gms.** { *; }
|
||||
-dontwarn com.google.android.gms.**
|
||||
|
||||
|
||||
|
||||
|
||||
# START OkHttp + Okio
|
||||
# JSR 305 annotations are for embedding nullability information.
|
||||
-dontwarn javax.annotation.**
|
||||
|
||||
|
||||
# A resource is loaded with a relative path so the package of this class must be preserved.
|
||||
-adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz
|
||||
|
||||
|
||||
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
|
||||
|
||||
# OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
|
||||
-dontwarn okhttp3.internal.platform.**
|
||||
-dontwarn org.conscrypt.**
|
||||
-dontwarn org.bouncycastle.**
|
||||
-dontwarn org.openjsse.**
|
||||
|
||||
|
||||
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
|
||||
|
||||
# END OkHttp + Okio
|
||||
|
||||
|
||||
# START Protobuf
|
||||
-dontwarn com.google.protobuf.**
|
||||
-keepclassmembers class com.google.protobuf.** {
|
||||
*;
|
||||
}
|
||||
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
|
||||
|
||||
|
||||
# END Protobuf
|
||||
-keepclassmembers class com.ironsource.sdk.controller.IronSourceWebView$JSInterface {
|
||||
public *;
|
||||
}
|
||||
-keepclassmembers class * implements android.os.Parcelable {
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
||||
-keep public class com.google.android.gms.ads.** {
|
||||
public *;
|
||||
}
|
||||
-keep class com.ironsource.adapters.** { *;
|
||||
}
|
||||
-dontwarn com.ironsource.mediationsdk.**
|
||||
-dontwarn com.ironsource.adapters.**
|
||||
-keepattributes JavascriptInterface
|
||||
-keepclassmembers class * {
|
||||
@android.webkit.JavascriptInterface <methods>;
|
||||
}
|
||||
-keep class com.bytedance.sdk.** { *; }
|
||||
-keep class com.inmobi.** { *; }
|
||||
-keep public class com.google.android.gms.**
|
||||
-dontwarn com.google.android.gms.**
|
||||
-dontwarn com.squareup.picasso.**
|
||||
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient{
|
||||
public *;
|
||||
}
|
||||
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info{
|
||||
public *;
|
||||
}
|
||||
# skip the Picasso library classes
|
||||
-keep class com.squareup.picasso.** {*;}
|
||||
-dontwarn com.squareup.okhttp.**
|
||||
# skip Moat classes
|
||||
-keep class com.moat.** {*;}
|
||||
-dontwarn com.moat.**
|
||||
# skip IAB classes
|
||||
-keep class com.iab.** {*;}
|
||||
-dontwarn com.iab.**
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-keep class com.mbridge.** {*; }
|
||||
-keep interface com.mbridge.** {*; }
|
||||
-keep class android.support.v4.** { *; }
|
||||
-dontwarn com.mbridge.**
|
||||
-keep class **.R$* { public static final int mbridge*; }
|
||||
-keep public class com.mbridge.* extends androidx.** { *; }
|
||||
-keep public class androidx.viewpager.widget.PagerAdapter{ *; }
|
||||
-keep public class androidx.viewpager.widget.ViewPager.OnPageChangeListener{ *; }
|
||||
-keep interface androidx.annotation.IntDef{ *; }
|
||||
-keep interface androidx.annotation.Nullable{ *; }
|
||||
-keep interface androidx.annotation.CheckResult{ *; }
|
||||
-keep interface androidx.annotation.NonNull{ *; }
|
||||
-keep public class androidx.fragment.app.Fragment{ *; }
|
||||
-keep public class androidx.core.content.FileProvider{ *; }
|
||||
-keep public class androidx.core.app.NotificationCompat{ *; }
|
||||
-keep public class androidx.appcompat.widget.AppCompatImageView { *; }
|
||||
-keep public class androidx.recyclerview.*{ *; }
|
||||
-keep class com.chartboost.** { *; }
|
||||
|
||||
#---------------------------------------------Topon
|
||||
|
||||
@ -2,28 +2,24 @@ package com.sound;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.applovin.sdk.AppLovinMediationProvider;
|
||||
import com.applovin.sdk.AppLovinSdk;
|
||||
import com.applovin.sdk.AppLovinSdkConfiguration;
|
||||
import com.applovin.sdk.AppLovinSdkInitializationConfiguration;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.anythink.core.api.ATSDK;
|
||||
import com.anythink.core.api.NetTrafficeCallback;
|
||||
|
||||
public class MainApplication extends Application {
|
||||
/**
|
||||
* 全局的上下文
|
||||
*/
|
||||
private static Context mContext;
|
||||
public static Context mContext;
|
||||
|
||||
public static final String TAG = "--------------";
|
||||
public static final String AD_BROADCAST = "on_success_action";
|
||||
private static final String MAX_SDK = "i4k2zRVkJrBdZ2AlcVyiG2B1feL1OvMldT2ea5279uyuoGXtC_5uGTbx7Up_JehNT_K0TmZK42hpEAFFwlHLEb";
|
||||
|
||||
public static Boolean initSDK = false;
|
||||
|
||||
private static final String AppKey = "a26e024a9bca8b461e84fa4d8897106d1";
|
||||
private static final String APPId = "h670f347749ff5";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
@ -63,19 +59,28 @@ public class MainApplication extends Application {
|
||||
|
||||
private void initSdk() {
|
||||
|
||||
AppLovinSdkInitializationConfiguration initConfig = AppLovinSdkInitializationConfiguration.builder(MAX_SDK, this)
|
||||
.setMediationProvider(AppLovinMediationProvider.MAX)
|
||||
.build();
|
||||
AppLovinSdk.getInstance(this).initialize(initConfig, new AppLovinSdk.SdkInitializationListener() {
|
||||
ATSDK.checkIsEuTraffic(this, new NetTrafficeCallback() {
|
||||
|
||||
@Override
|
||||
public void onSdkInitialized(final AppLovinSdkConfiguration sdkConfig) {
|
||||
initSDK = true;
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(new Intent(AD_BROADCAST));
|
||||
public void onResultCallback(boolean isEU) {
|
||||
Log.e(TAG, "onResultCallback:" + isEU);
|
||||
if (isEU && ATSDK.getGDPRDataLevel(MainApplication.this) == ATSDK.UNKNOWN) {
|
||||
ATSDK.showGdprAuth(MainApplication.this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onErrorCallback(String errorMsg) {
|
||||
Log.e(TAG, "onErrorCallback:" + errorMsg);
|
||||
}
|
||||
});
|
||||
AppLovinSdk.getInstance(this).getSettings().setVerboseLogging(true);
|
||||
//MAX广告测试
|
||||
// AppLovinSdk.getInstance( this ).showMediationDebugger();
|
||||
|
||||
ATSDK.init( this, APPId, AppKey);
|
||||
com.sound.prankparty.topon.AdManager.loadAllAd();
|
||||
//测试工具
|
||||
// ATDebuggerUITest.showDebuggerUI(this,debug_KEy);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -12,8 +12,9 @@ import com.sound.prankparty.JSON.Category;
|
||||
import com.sound.prankparty.JSON.SoundItem;
|
||||
import com.sound.prankparty.Utils.ItemDecoration;
|
||||
import com.sound.prankparty.databinding.ActivityAirhonrBinding;
|
||||
import com.sound.prankparty.max.MaxManager;
|
||||
import com.sound.prankparty.max.onAdAfterAction;
|
||||
import com.sound.prankparty.topon.AdManager;
|
||||
import com.sound.prankparty.topon.onActionListener;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -28,7 +29,7 @@ public class AirHornActivity extends AppCompatActivity {
|
||||
binding = ActivityAirhonrBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
MaxManager.onLoadAd();
|
||||
AdManager.loadAllAd();
|
||||
|
||||
binding.airHornRecyclerview.setLayoutManager(new GridLayoutManager(this, 3));
|
||||
|
||||
@ -51,7 +52,7 @@ public class AirHornActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showAd(new onAdAfterAction() {
|
||||
showAd(new onActionListener() {
|
||||
|
||||
@Override
|
||||
public void onAction() {
|
||||
@ -70,7 +71,7 @@ public class AirHornActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
showAd(new onAdAfterAction() {
|
||||
showAd(new onActionListener() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
finish();
|
||||
@ -78,8 +79,8 @@ public class AirHornActivity extends AppCompatActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void showAd(onAdAfterAction listener) {
|
||||
MaxManager.startShowMaxAd(this, new onAdAfterAction() {
|
||||
private void showAd(onActionListener listener) {
|
||||
AdManager.showTopOn(this, new onActionListener() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
listener.onAction();
|
||||
|
||||
@ -4,12 +4,10 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.database.ContentObserver;
|
||||
import android.media.AudioManager;
|
||||
import android.media.MediaPlayer;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.SeekBar;
|
||||
@ -27,8 +25,8 @@ import com.sound.prankparty.Room.AppDatabase;
|
||||
import com.sound.prankparty.Room.FavoriteSounds;
|
||||
import com.sound.prankparty.Room.FavoriteSoundsDao;
|
||||
import com.sound.prankparty.databinding.ActivityPlaySoundBinding;
|
||||
import com.sound.prankparty.max.MaxManager;
|
||||
import com.sound.prankparty.max.onAdAfterAction;
|
||||
import com.sound.prankparty.topon.AdManager;
|
||||
import com.sound.prankparty.topon.onActionListener;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@ -52,7 +50,7 @@ public class PlaySoundActivity extends AppCompatActivity {
|
||||
binding = ActivityPlaySoundBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
MaxManager.onLoadAd();
|
||||
AdManager.loadAllAd();
|
||||
|
||||
|
||||
// 获取音频管理器
|
||||
@ -73,7 +71,7 @@ public class PlaySoundActivity extends AppCompatActivity {
|
||||
binding.back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showAd(new onAdAfterAction() {
|
||||
showAd(new onActionListener() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
finish();
|
||||
@ -302,7 +300,7 @@ public class PlaySoundActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
showAd(new onAdAfterAction() {
|
||||
showAd(new onActionListener() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
finish();
|
||||
@ -310,8 +308,8 @@ public class PlaySoundActivity extends AppCompatActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void showAd(onAdAfterAction listener) {
|
||||
MaxManager.startShowMaxAd(this, new onAdAfterAction() {
|
||||
private void showAd(onActionListener listener) {
|
||||
AdManager.showTopOn(this, new onActionListener() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
listener.onAction();
|
||||
|
||||
@ -7,13 +7,8 @@ import android.widget.ProgressBar;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.app.wallpaper.max.WelComManager;
|
||||
import com.sound.prankparty.databinding.ActivitySplashBinding;
|
||||
import com.sound.prankparty.max.MaxManager;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import com.sound.prankparty.topon.AdManager;
|
||||
|
||||
public class SplashActivity extends AppCompatActivity {
|
||||
|
||||
@ -28,30 +23,27 @@ public class SplashActivity extends AppCompatActivity {
|
||||
binding = ActivitySplashBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
MaxManager.onLoadAd();
|
||||
AdManager.loadAllAd();
|
||||
|
||||
// 使用 ViewBinding 引用 progressBar
|
||||
ProgressBar progressBar = binding.progressBar;
|
||||
|
||||
|
||||
countDownTimer = WelComManager.initTimer(this, timer, new Function1<Long, Unit>() {
|
||||
@Override
|
||||
public Unit invoke(Long aLong) {
|
||||
float l1 = (float) aLong / timer;
|
||||
float v = 100 - l1 * 100;
|
||||
progressBar.setProgress((int) v);
|
||||
return null;
|
||||
}
|
||||
}, new Function0<Unit>() {
|
||||
@Override
|
||||
public Unit invoke() {
|
||||
startMainActivity();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
AdManager.setAlreadyShow();
|
||||
|
||||
countDownTimer = AdManager.showWelcomeAd(this, timer, millisUntilFinished -> {
|
||||
int percentage = (int) (100 - (float) millisUntilFinished / timer * 100);
|
||||
progressBar.setProgress(percentage);
|
||||
},
|
||||
this::startMain // 倒计时结束或广告展示结束时,跳转主界面
|
||||
);
|
||||
|
||||
countDownTimer.start();
|
||||
}
|
||||
|
||||
private void startMainActivity() {
|
||||
private void startMain() {
|
||||
binding.progressBar.setProgress(100);
|
||||
|
||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
|
||||
@ -20,8 +20,9 @@ import com.sound.MainApplication;
|
||||
import com.sound.prankparty.Activity.PlaySoundActivity;
|
||||
import com.sound.prankparty.JSON.SoundItem;
|
||||
import com.sound.prankparty.R;
|
||||
import com.sound.prankparty.max.MaxManager;
|
||||
import com.sound.prankparty.max.onAdAfterAction;
|
||||
import com.sound.prankparty.topon.AdManager;
|
||||
import com.sound.prankparty.topon.onActionListener;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -92,7 +93,7 @@ public class AirHornRecyclerViewAdapter extends RecyclerView.Adapter<AirHornRecy
|
||||
|
||||
|
||||
private void showAdAndNavigate(SoundItem soundItem) {
|
||||
MaxManager.startShowMaxAd(activity, new onAdAfterAction() {
|
||||
AdManager.showTopOn(activity, new onActionListener() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
Intent intent = new Intent(context, PlaySoundActivity.class);
|
||||
|
||||
@ -19,12 +19,10 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||
import com.sound.MainApplication;
|
||||
import com.sound.prankparty.Activity.AirHornActivity;
|
||||
import com.sound.prankparty.Activity.PlaySoundActivity;
|
||||
import com.sound.prankparty.JSON.Category;
|
||||
import com.sound.prankparty.JSON.SoundItem;
|
||||
import com.sound.prankparty.R;
|
||||
import com.sound.prankparty.max.MaxManager;
|
||||
import com.sound.prankparty.max.onAdAfterAction;
|
||||
import com.sound.prankparty.topon.AdManager;
|
||||
import com.sound.prankparty.topon.onActionListener;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -102,7 +100,7 @@ public class SoundRecyclerViewAdapter extends RecyclerView.Adapter<SoundRecycler
|
||||
}
|
||||
|
||||
private void showAdAndNavigate(int currentColor,Category category) {
|
||||
MaxManager.startShowMaxAd(activity, new onAdAfterAction() {
|
||||
AdManager.showTopOn(activity, new onActionListener() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
Intent intent = new Intent(context, AirHornActivity.class);
|
||||
|
||||
@ -22,8 +22,7 @@ import com.sound.prankparty.Utils.ItemDecoration;
|
||||
import com.sound.prankparty.Utils.JsonParser;
|
||||
import com.sound.prankparty.Utils.LoadJSON;
|
||||
import com.sound.prankparty.databinding.FragmentSoundBinding;
|
||||
import com.sound.prankparty.max.MaxManager;
|
||||
import com.sound.prankparty.max.onAdAfterAction;
|
||||
import com.sound.prankparty.topon.AdManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -41,7 +40,7 @@ public class SoundFragment extends Fragment {
|
||||
binding = FragmentSoundBinding.inflate(inflater, container, false);
|
||||
View view = binding.getRoot();
|
||||
|
||||
MaxManager.onLoadAd();
|
||||
AdManager.loadAllAd();
|
||||
|
||||
// 设置 RecyclerView 的布局管理器和适配器
|
||||
binding.soundRecyclerview.setLayoutManager(new GridLayoutManager(getContext(), 2));
|
||||
@ -114,16 +113,6 @@ public class SoundFragment extends Fragment {
|
||||
}
|
||||
|
||||
|
||||
private void showAd(onAdAfterAction listener) {
|
||||
MaxManager.startShowMaxAd(requireActivity(), new onAdAfterAction() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
listener.onAction();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分享纯文本
|
||||
*
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
package com.sound.prankparty.max;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
|
||||
public interface MaxListener {
|
||||
void onFail(MaxAd ad);
|
||||
|
||||
void onShowSuccess(MaxAd ad);
|
||||
|
||||
void onHidden();
|
||||
}
|
||||
@ -1,182 +0,0 @@
|
||||
package com.sound.prankparty.max;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.MaxAdListener;
|
||||
import com.applovin.mediation.MaxError;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.sound.MainApplication;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class MaxManager {
|
||||
/**
|
||||
* Prank_int_1
|
||||
* f7f5224a3b4c20de
|
||||
* Prank_int_2
|
||||
* 96021e6bfd72b5be
|
||||
* Prank_int_3
|
||||
* e7d98b01f176af15
|
||||
*/
|
||||
private static final String one_AD = "f7f5224a3b4c20de";
|
||||
private static final String two_Ad = "96021e6bfd72b5be";
|
||||
private static final String three_ad = "e7d98b01f176af15";
|
||||
|
||||
|
||||
public static final int type_no_cache = 0;
|
||||
public static final int type_has_cache = 1;
|
||||
public static final int type_show_success = 2;
|
||||
public static final int type_show_close = 3;
|
||||
public static final int type_show_fail = 4;
|
||||
|
||||
private static List<MaxInterstitialAd> adList = new ArrayList<>();
|
||||
|
||||
public static MaxInterstitialAd getAd(List<MaxInterstitialAd> list) {
|
||||
Collections.shuffle(list);
|
||||
for (MaxInterstitialAd ad : list) {
|
||||
if (ad.isReady()) {
|
||||
return ad;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<MaxInterstitialAd> onLoadAd() {
|
||||
if (adList.isEmpty()) {
|
||||
MaxInterstitialAd AdT = new MaxInterstitialAd(two_Ad, MainApplication.getContext());
|
||||
MaxInterstitialAd AdOne = new MaxInterstitialAd(one_AD, MainApplication.getContext());
|
||||
MaxInterstitialAd AdThree = new MaxInterstitialAd(three_ad, MainApplication.getContext());
|
||||
|
||||
adList.add(AdOne);
|
||||
adList.add(AdT);
|
||||
adList.add(AdThree);
|
||||
|
||||
}
|
||||
|
||||
for (MaxInterstitialAd ad : adList) {
|
||||
if (!ad.isReady()) {
|
||||
setMyListener(ad, new MaxListener() {
|
||||
@Override
|
||||
public void onFail(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowSuccess(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHidden() {
|
||||
|
||||
}
|
||||
});
|
||||
ad.loadAd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return adList;
|
||||
}
|
||||
|
||||
public static void setMyListener(MaxInterstitialAd ad, MaxListener maxListener) {
|
||||
ad.setListener(new MaxAdListener() {
|
||||
@Override
|
||||
public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||
Log.d(MainApplication.TAG, "-------onAdLoaded-----maxAd=" + maxAd.getAdUnitId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||
Log.d(MainApplication.TAG, "-------onAdDisplayed-----maxAd=" + maxAd.getAdUnitId());
|
||||
maxListener.onShowSuccess(maxAd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||
Log.d(MainApplication.TAG, "-------onAdHidden-----maxAd=" + maxAd.getAdUnitId());
|
||||
maxListener.onHidden();
|
||||
setMyListener(ad, new MaxListener() {
|
||||
@Override
|
||||
public void onFail(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowSuccess(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHidden() {
|
||||
|
||||
}
|
||||
});
|
||||
ad.loadAd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||
Log.d(MainApplication.TAG, "-------onAdLoadFailed-----s=" + s + "----maxError=" + maxError.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||
maxListener.onFail(maxAd);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static void ShowAd(Activity activity, onAdStatusListener listener) {
|
||||
MaxInterstitialAd ad = MaxManager.getAd(adList);
|
||||
if (ad == null) {
|
||||
listener.onAdStatus(type_no_cache);
|
||||
} else {
|
||||
listener.onAdStatus(type_has_cache);
|
||||
MaxManager.setMyListener(ad, new MaxListener() {
|
||||
@Override
|
||||
public void onFail(MaxAd ad) {
|
||||
listener.onAdStatus(type_show_fail);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowSuccess(MaxAd ad) {
|
||||
listener.onAdStatus(type_show_success);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHidden() {
|
||||
listener.onAdStatus(type_show_close);
|
||||
}
|
||||
});
|
||||
ad.showAd(activity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void startShowMaxAd(Activity activity, onAdAfterAction listener) {
|
||||
MaxManager.ShowAd(activity, new onAdStatusListener() {
|
||||
@Override
|
||||
public void onAdStatus(int type) {
|
||||
if (type == MaxManager.type_show_close || type == MaxManager.type_show_fail || type == MaxManager.type_no_cache) {
|
||||
if (listener != null)
|
||||
listener.onAction();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
package com.app.wallpaper.max
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.os.CountDownTimer
|
||||
import android.util.Log
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd
|
||||
import com.sound.MainApplication
|
||||
import com.sound.prankparty.max.MaxManager
|
||||
|
||||
|
||||
object WelComManager {
|
||||
|
||||
private lateinit var timer: CountDownTimer
|
||||
|
||||
private var need_Show = true
|
||||
|
||||
private lateinit var lists: List<MaxInterstitialAd>
|
||||
|
||||
@JvmStatic
|
||||
fun initTimer(activity: Activity, countTime: Long,countAction: (Long) -> Unit, goMainAction: () -> Unit): CountDownTimer {
|
||||
need_Show = true
|
||||
timer = object : CountDownTimer(countTime, 100) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
countAction.invoke(millisUntilFinished)
|
||||
if (need_Show) {
|
||||
MaxManager.ShowAd(activity) {
|
||||
Log.d(MainApplication.TAG, "--onTick----------it=$it")
|
||||
if (it == MaxManager.type_has_cache) {
|
||||
need_Show = false
|
||||
}
|
||||
if (it == MaxManager.type_show_close || it == MaxManager.type_show_fail) {
|
||||
Log.d(MainApplication.TAG, "--onTick---------enter")
|
||||
goMainAction.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
if (need_Show) {
|
||||
MaxManager.ShowAd(activity) {
|
||||
if (it == MaxManager.type_show_close || it == MaxManager.type_show_fail || it == MaxManager.type_no_cache) {
|
||||
Log.d(MainApplication.TAG, "--onFinish---------enter")
|
||||
goMainAction.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
startAd(activity)
|
||||
return timer
|
||||
}
|
||||
|
||||
private fun startAd(activity: Activity) {
|
||||
if (!MainApplication.initSDK) {
|
||||
LocalBroadcastManager.getInstance(activity)
|
||||
.registerReceiver(object : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
lists = MaxManager.onLoadAd()
|
||||
timer.start()
|
||||
Log.d(MainApplication.TAG, "------------1sucess")
|
||||
}
|
||||
}, IntentFilter(MainApplication.AD_BROADCAST))
|
||||
} else {
|
||||
lists = MaxManager.onLoadAd()
|
||||
timer.start()
|
||||
Log.d(MainApplication.TAG, "------------2sucess")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
package com.sound.prankparty.max;
|
||||
|
||||
public interface onAdAfterAction {
|
||||
|
||||
void onAction();
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
package com.sound.prankparty.max;
|
||||
|
||||
public interface onAdStatusListener {
|
||||
|
||||
void onAdStatus(int type);
|
||||
}
|
||||
11
app/src/main/java/com/sound/prankparty/topon/AdListener.java
Normal file
11
app/src/main/java/com/sound/prankparty/topon/AdListener.java
Normal file
@ -0,0 +1,11 @@
|
||||
package com.sound.prankparty.topon;
|
||||
|
||||
|
||||
public interface AdListener {
|
||||
void loadFail(String placeId);
|
||||
void showSuccess();
|
||||
|
||||
void showFail();
|
||||
|
||||
void showClose();
|
||||
}
|
||||
253
app/src/main/java/com/sound/prankparty/topon/AdManager.java
Normal file
253
app/src/main/java/com/sound/prankparty/topon/AdManager.java
Normal file
@ -0,0 +1,253 @@
|
||||
package com.sound.prankparty.topon;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.CountDownTimer;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.anythink.core.api.ATAdInfo;
|
||||
import com.anythink.core.api.AdError;
|
||||
import com.anythink.interstitial.api.ATInterstitial;
|
||||
import com.anythink.interstitial.api.ATInterstitialListener;
|
||||
import com.sound.MainApplication;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class AdManager {
|
||||
|
||||
private static final int type_no_cache = 0;
|
||||
private static final int type_has_cache = 1;
|
||||
private static final int type_show_success = 2;
|
||||
private static final int type_show_close = 3;
|
||||
private static final int type_show_fail = 4;
|
||||
|
||||
/**
|
||||
Prank _Int_3
|
||||
n670f349b6985b
|
||||
Prank _Int_2
|
||||
n670f349b1b35c
|
||||
Prank _Int_1
|
||||
n670f349ab99bc
|
||||
*/
|
||||
|
||||
private static final String place1Id = "n670f349ab99bc";
|
||||
private static final String place2Id = "n670f349b1b35c";
|
||||
private static final String place3Id = "n670f349b6985b";
|
||||
|
||||
|
||||
private static boolean place1LoadFail = false;
|
||||
private static boolean place2LoadFail = false;
|
||||
private static boolean place3LoadFail = false;
|
||||
|
||||
private static boolean alreadyShow = false;
|
||||
|
||||
private static List<ATInterstitial> list = new ArrayList<>();
|
||||
|
||||
|
||||
public static void loadAllAd() {
|
||||
if (list.isEmpty()) {
|
||||
ATInterstitial mInterstitialAd1 = new ATInterstitial(MainApplication.mContext, place1Id);
|
||||
ATInterstitial mInterstitialAd2 = new ATInterstitial(MainApplication.mContext, place2Id);
|
||||
ATInterstitial mInterstitialAd3 = new ATInterstitial(MainApplication.mContext, place3Id);
|
||||
list.add(mInterstitialAd1);
|
||||
list.add(mInterstitialAd2);
|
||||
list.add(mInterstitialAd3);
|
||||
}
|
||||
for (ATInterstitial ad : list) {
|
||||
if (!ad.isAdReady()) {
|
||||
setCallBack(ad, new com.sound.prankparty.topon.AdListener() {
|
||||
@Override
|
||||
public void loadFail(@NonNull String placeId) {
|
||||
if (placeId.equals(place1Id)) {
|
||||
place1LoadFail = true;
|
||||
}
|
||||
if (placeId.equals(place2Id)) {
|
||||
place2LoadFail = true;
|
||||
}
|
||||
if (placeId.equals(place3Id)) {
|
||||
place3LoadFail = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showSuccess() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showFail() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showClose() {
|
||||
|
||||
}
|
||||
});
|
||||
ad.load();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static ATInterstitial getReadyAd() {
|
||||
Collections.shuffle(list);
|
||||
for (ATInterstitial ad : list) {
|
||||
if (ad.isAdReady()) {
|
||||
Log.d(MainApplication.TAG, "-has Cache------------");
|
||||
return ad;
|
||||
}
|
||||
}
|
||||
Log.d(MainApplication.TAG, "-No Cache------------");
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void setCallBack(ATInterstitial ad, com.sound.prankparty.topon.AdListener listener) {
|
||||
ad.setAdListener(new ATInterstitialListener() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdLoaded() {
|
||||
Log.d(MainApplication.TAG, "LoadLoaded " + ad.mPlacementId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdLoadFail(AdError adError) {
|
||||
listener.loadFail(ad.mPlacementId);
|
||||
Log.d(MainApplication.TAG, "LoadFail:--" + ad.mPlacementId + "--" + adError.getCode() + "---" + adError.getDesc());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdClicked(ATAdInfo atAdInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdShow(ATAdInfo atAdInfo) {
|
||||
Log.d(MainApplication.TAG, "AdShow " + atAdInfo.getShowId());
|
||||
listener.showSuccess();
|
||||
ad.load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdClose(ATAdInfo atAdInfo) {
|
||||
listener.showClose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdVideoStart(ATAdInfo atAdInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdVideoEnd(ATAdInfo atAdInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdVideoError(AdError adError) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void setAlreadyShow(){
|
||||
alreadyShow = false;
|
||||
}
|
||||
|
||||
|
||||
public static CountDownTimer showWelcomeAd(
|
||||
Activity activity,
|
||||
Long totalTim,
|
||||
com.sound.prankparty.topon.CountAction countAction,
|
||||
com.sound.prankparty.topon.GoMainAction goMain
|
||||
) {
|
||||
|
||||
CountDownTimer timer = new CountDownTimer(totalTim, 100) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
countAction.onCount(millisUntilFinished);
|
||||
if (!alreadyShow) {
|
||||
showAD(activity, new com.sound.prankparty.topon.AdStatusAction() {
|
||||
@Override
|
||||
public void onStatus(int adType) {
|
||||
if (adType == type_has_cache) {
|
||||
alreadyShow = true;
|
||||
}
|
||||
if (adType == type_show_close || adType == type_show_fail) {
|
||||
goMain.onGo();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (!alreadyShow) {
|
||||
showTopOn(activity, new com.sound.prankparty.topon.onActionListener() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
goMain.onGo();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return timer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void showAD(Activity activity, com.sound.prankparty.topon.AdStatusAction action) {
|
||||
ATInterstitial readyAd = getReadyAd();
|
||||
if (readyAd != null) {
|
||||
action.onStatus(type_has_cache);
|
||||
setCallBack(readyAd, new com.sound.prankparty.topon.AdListener() {
|
||||
@Override
|
||||
public void loadFail(@NonNull String placeId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showSuccess() {
|
||||
action.onStatus(type_show_success);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showFail() {
|
||||
action.onStatus(type_show_fail);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showClose() {
|
||||
action.onStatus(type_show_close);
|
||||
}
|
||||
});
|
||||
readyAd.show(activity);
|
||||
} else {
|
||||
action.onStatus(type_no_cache);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void showTopOn(Activity activity,onActionListener listener) {
|
||||
showAD(activity, new com.sound.prankparty.topon.AdStatusAction() {
|
||||
@Override
|
||||
public void onStatus(int adType) {
|
||||
if (adType == type_no_cache || adType == type_show_close || adType == type_show_fail) {
|
||||
listener.onAction();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.sound.prankparty.topon;
|
||||
|
||||
public interface AdStatusAction {
|
||||
void onStatus(int adType);
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.sound.prankparty.topon;
|
||||
|
||||
public interface CountAction {
|
||||
void onCount(long millisUntilFinished);
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.sound.prankparty.topon;
|
||||
|
||||
public interface GoMainAction {
|
||||
void onGo();
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
package com.sound.prankparty.topon;
|
||||
|
||||
public interface onActionListener {
|
||||
|
||||
void onAction();
|
||||
}
|
||||
@ -7,6 +7,6 @@ plugins {
|
||||
}
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath("com.applovin.quality:AppLovinQualityServiceGradlePlugin:+")
|
||||
|
||||
}
|
||||
}
|
||||
@ -10,8 +10,6 @@ pluginManagement {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
|
||||
maven { url = uri("https://artifacts.applovin.com/android") }
|
||||
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
@ -20,8 +18,28 @@ dependencyResolutionManagement {
|
||||
google()
|
||||
mavenCentral()
|
||||
|
||||
maven { url = uri("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea") }
|
||||
maven { url = uri("https://artifact.bytedance.com/repository/pangle") }
|
||||
//Anythink(Core)
|
||||
maven ("https://jfrog.anythinktech.com/artifactory/overseas_sdk")
|
||||
|
||||
//Appnext
|
||||
maven ("https://dl.appnext.com")
|
||||
|
||||
//Ironsource
|
||||
maven ("https://android-sdk.is.com/")
|
||||
|
||||
//Pangle
|
||||
maven ("https://artifact.bytedance.com/repository/pangle")
|
||||
|
||||
//Mintegral
|
||||
maven ("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea")
|
||||
|
||||
//Chartboost
|
||||
maven ("https://cboost.jfrog.io/artifactory/chartboost-ads")
|
||||
maven ("https://cboost.jfrog.io/artifactory/chartboost-mediation")
|
||||
|
||||
//TopOn集成测试工具
|
||||
// maven ( "https://jfrog.anythinktech.com/artifactory/debugger")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user