Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
725fdd8fd5 | ||
|
|
e4864a6adc | ||
|
|
13c464b854 |
BIN
.safedk/api/SafeDKAndroid-6.5.2.jar
Normal file
BIN
.safedk/api/SafeDKAndroid-6.5.2.jar
Normal file
Binary file not shown.
@ -8,6 +8,8 @@ daaea35726ab7cd457ab61d4538fb822
|
|||||||
1be9e72506f3307ce6a9e78d26d65bd0
|
1be9e72506f3307ce6a9e78d26d65bd0
|
||||||
7eac188d3286b05ccbba774f63a2c049
|
7eac188d3286b05ccbba774f63a2c049
|
||||||
4df96d3bc9afd17b812e65e6c6add1ef
|
4df96d3bc9afd17b812e65e6c6add1ef
|
||||||
|
becf75b2cc99e82716da2e6697879509
|
||||||
|
7eec7b9476b99b3ce94533da4f2eb987
|
||||||
974322f19d813702ea048d95288d2b8c
|
974322f19d813702ea048d95288d2b8c
|
||||||
29015bbfcc182d80e7f75bd2c38e4521
|
29015bbfcc182d80e7f75bd2c38e4521
|
||||||
dd2971b0681141d57b221687791ad1bd
|
dd2971b0681141d57b221687791ad1bd
|
||||||
|
|||||||
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.
@ -1,2 +1,2 @@
|
|||||||
#Sat Oct 12 11:00:37 CST 2024
|
#Fri Oct 18 17:36:45 CST 2024
|
||||||
json=-780482554
|
json=1556480289
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#
|
#
|
||||||
#Sat Oct 12 11:00:37 CST 2024
|
#Fri Oct 18 17:36:45 CST 2024
|
||||||
|
C8XiiEAUrUDh6nWnlsJz8iEhrTyNLUctJ_xGloqZJHwJINes1b_Md0rTpgbdETXAq9eH5RVsJqqNTILCA2qnbA=i4k2zRVkJrBdZ2AlcVyiG2B1feL1OvMldT2ea5279uyuoGXtC_5uGTbx7Up_JehNT_K0TmZK42hpEAFFwlHLEb
|
||||||
sdk_analysis_plugin_version=5.5.0
|
sdk_analysis_plugin_version=5.5.0
|
||||||
set_multidex=true
|
set_multidex=true
|
||||||
y87o4e7vb5bbqzuGVTFyOIfZiyBG0Nf0Ksq8S3m2MJOHf_A5BcWGJnKuQqoxwxVvtdQdiTC4O3MPzFwy8rJ9Cc=3cUMfTcsZKzlJevxK4IkNysgDAeQA4B5w332p3g8B9ZAgC54WQNZLVxuxnCx4sCHA5StLJnDTAFa68mFTi8rd8
|
y87o4e7vb5bbqzuGVTFyOIfZiyBG0Nf0Ksq8S3m2MJOHf_A5BcWGJnKuQqoxwxVvtdQdiTC4O3MPzFwy8rJ9Cc=3cUMfTcsZKzlJevxK4IkNysgDAeQA4B5w332p3g8B9ZAgC54WQNZLVxuxnCx4sCHA5StLJnDTAFa68mFTi8rd8
|
||||||
|
|||||||
@ -6,6 +6,8 @@ plugins {
|
|||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
id("org.jetbrains.kotlin.android")
|
id("org.jetbrains.kotlin.android")
|
||||||
id ("kotlin-kapt")
|
id ("kotlin-kapt")
|
||||||
|
id("com.google.gms.google-services")
|
||||||
|
id("com.google.firebase.crashlytics")
|
||||||
}
|
}
|
||||||
|
|
||||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||||
@ -23,8 +25,8 @@ android {
|
|||||||
applicationId = "com.sound.prankparty"
|
applicationId = "com.sound.prankparty"
|
||||||
minSdk = 23
|
minSdk = 23
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 11
|
versionCode = 14
|
||||||
versionName = "1.0.3"
|
versionName = "1.0.5"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
@ -67,6 +69,10 @@ dependencies {
|
|||||||
kapt("androidx.room:room-compiler:2.6.1")
|
kapt("androidx.room:room-compiler:2.6.1")
|
||||||
|
|
||||||
|
|
||||||
|
implementation(platform("com.google.firebase:firebase-bom:33.4.0"))
|
||||||
|
implementation("com.google.firebase:firebase-analytics-ktx")
|
||||||
|
implementation("com.google.firebase:firebase-crashlytics-ktx")
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------TopOn(Mintegral、Pangle、UnitAds、Digital Turbine(Fyber)、Chartboost&Helium、Ironsource、Liftoff(Vungle)、Inmobi、Start.io、Appnext、Bigo)
|
//-----------------------------------------------TopOn(Mintegral、Pangle、UnitAds、Digital Turbine(Fyber)、Chartboost&Helium、Ironsource、Liftoff(Vungle)、Inmobi、Start.io、Appnext、Bigo)
|
||||||
|
|
||||||
@ -158,4 +164,5 @@ dependencies {
|
|||||||
|
|
||||||
//----------------------------------------------TopOn
|
//----------------------------------------------TopOn
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
29
app/google-services.json
Normal file
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "996249361139",
|
||||||
|
"project_id": "air-horn-prank-3453e",
|
||||||
|
"storage_bucket": "air-horn-prank-3453e.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:996249361139:android:cf08548e7bcd5fe734f586",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.sound.prankparty"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDAJoKU__0Owt0JfRZR8fgSL-3T08QfuFQ"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
@ -168,6 +168,3 @@
|
|||||||
-keep class com.chartboost.** { *; }
|
-keep class com.chartboost.** { *; }
|
||||||
|
|
||||||
#---------------------------------------------Topon
|
#---------------------------------------------Topon
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,29 +6,37 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.anythink.core.api.ATSDK;
|
import com.anythink.core.api.ATSDK;
|
||||||
import com.anythink.core.api.NetTrafficeCallback;
|
import com.anythink.core.api.NetTrafficeCallback;
|
||||||
import com.sound.prankparty.topon.AdManager;
|
|
||||||
|
|
||||||
public class MainApplication extends Application {
|
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";
|
public static final String AD_BROADCAST = "on_success_action";
|
||||||
|
|
||||||
public static Boolean initSDK = false;
|
public static Boolean initSDK = false;
|
||||||
|
|
||||||
private static final String AppKey = "a26e024a9bca8b461e84fa4d8897106d1";
|
private static final String AppKey = "a26e024a9bca8b461e84fa4d8897106d1";
|
||||||
private static final String APPId = "h670f347749ff5";
|
private static final String APPId = "h670f347749ff5";
|
||||||
|
|
||||||
public static String TAG = "-------Prank----------";
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
//获取应用的上下文并赋值给 mContext
|
//获取应用的上下文并赋值给 mContext
|
||||||
mContext = getApplicationContext();
|
mContext = getApplicationContext();
|
||||||
|
|
||||||
|
// // 确保Firebase初始化
|
||||||
|
// FirebaseApp.initializeApp(this);
|
||||||
|
//
|
||||||
|
// // 输出日志以确认Firebase初始化
|
||||||
|
// if (!FirebaseApp.getApps(this).isEmpty()) {
|
||||||
|
// Log.d(TAG, "Firebase 初始化成功");
|
||||||
|
// } else {
|
||||||
|
// Log.e(TAG, "Firebase 初始化失败");
|
||||||
|
// }
|
||||||
|
|
||||||
initSdk();
|
initSdk();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -68,10 +76,11 @@ public class MainApplication extends Application {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ATSDK.init(this, APPId, AppKey);
|
ATSDK.init( this, APPId, AppKey);
|
||||||
AdManager.loadAllAd();
|
com.sound.prankparty.topon.AdManager.loadAllAd();
|
||||||
//测试工具
|
//测试工具
|
||||||
// ATDebuggerUITest.showDebuggerUI(this,"a8dd4a3f1c38a5a3cadb4f39385fb682af63df07");
|
// ATDebuggerUITest.showDebuggerUI(this,debug_KEy);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ public class AirHornActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
AdManager.showTopOn(AirHornActivity.this,new onActionListener() {
|
showAd(new onActionListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAction() {
|
public void onAction() {
|
||||||
@ -71,7 +71,7 @@ public class AirHornActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
AdManager.showTopOn(this, new onActionListener() {
|
showAd(new onActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAction() {
|
public void onAction() {
|
||||||
finish();
|
finish();
|
||||||
@ -79,5 +79,14 @@ public class AirHornActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.database.ContentObserver;
|
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.media.MediaPlayer;
|
import android.media.MediaPlayer;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
@ -73,7 +71,7 @@ public class PlaySoundActivity extends AppCompatActivity {
|
|||||||
binding.back.setOnClickListener(new View.OnClickListener() {
|
binding.back.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
AdManager.showTopOn(PlaySoundActivity.this,new onActionListener() {
|
showAd(new onActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAction() {
|
public void onAction() {
|
||||||
finish();
|
finish();
|
||||||
@ -302,7 +300,7 @@ public class PlaySoundActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
AdManager.showTopOn(this,new onActionListener() {
|
showAd(new onActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAction() {
|
public void onAction() {
|
||||||
finish();
|
finish();
|
||||||
@ -310,5 +308,14 @@ public class PlaySoundActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showAd(onActionListener listener) {
|
||||||
|
AdManager.showTopOn(this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
|
listener.onAction();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import com.sound.prankparty.topon.AdManager;
|
|||||||
public class SplashActivity extends AppCompatActivity {
|
public class SplashActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private ActivitySplashBinding binding;
|
private ActivitySplashBinding binding;
|
||||||
private static final long totalTime = 11000; // 倒计时总时间
|
private long timer = 12000;
|
||||||
private CountDownTimer countDownTimer;
|
private CountDownTimer countDownTimer;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -23,27 +23,27 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
binding = ActivitySplashBinding.inflate(getLayoutInflater());
|
binding = ActivitySplashBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
AdManager.loadAllAd();
|
||||||
|
|
||||||
// 使用 ViewBinding 引用 progressBar
|
// 使用 ViewBinding 引用 progressBar
|
||||||
ProgressBar progressBar = binding.progressBar;
|
ProgressBar progressBar = binding.progressBar;
|
||||||
|
|
||||||
|
|
||||||
AdManager.setAlreadyShow();
|
AdManager.setAlreadyShow();
|
||||||
|
|
||||||
countDownTimer = AdManager.showWelcomeAd(this, totalTime, millisUntilFinished -> {
|
countDownTimer = AdManager.showWelcomeAd(this, timer, millisUntilFinished -> {
|
||||||
int percentage = (int) (100 - (float) millisUntilFinished / totalTime * 100);
|
int percentage = (int) (100 - (float) millisUntilFinished / timer * 100);
|
||||||
progressBar.setProgress(percentage);
|
progressBar.setProgress(percentage);
|
||||||
},
|
},
|
||||||
this::startMain // 倒计时结束或广告展示结束时,跳转主界面
|
this::startMain // 倒计时结束或广告展示结束时,跳转主界面
|
||||||
);
|
);
|
||||||
|
|
||||||
countDownTimer.start();
|
countDownTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转到主界面的方法
|
|
||||||
private void startMain() {
|
private void startMain() {
|
||||||
// 确保进度条更新至满值
|
|
||||||
binding.progressBar.setProgress(100);
|
binding.progressBar.setProgress(100);
|
||||||
|
|
||||||
// 跳转到主界面
|
|
||||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
|||||||
@ -20,10 +20,10 @@ import com.sound.MainApplication;
|
|||||||
import com.sound.prankparty.Activity.PlaySoundActivity;
|
import com.sound.prankparty.Activity.PlaySoundActivity;
|
||||||
import com.sound.prankparty.JSON.SoundItem;
|
import com.sound.prankparty.JSON.SoundItem;
|
||||||
import com.sound.prankparty.R;
|
import com.sound.prankparty.R;
|
||||||
|
|
||||||
import com.sound.prankparty.topon.AdManager;
|
import com.sound.prankparty.topon.AdManager;
|
||||||
import com.sound.prankparty.topon.onActionListener;
|
import com.sound.prankparty.topon.onActionListener;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class AirHornRecyclerViewAdapter extends RecyclerView.Adapter<AirHornRecyclerViewAdapter.AirhonrViewHolder> {
|
public class AirHornRecyclerViewAdapter extends RecyclerView.Adapter<AirHornRecyclerViewAdapter.AirhonrViewHolder> {
|
||||||
|
|||||||
@ -33,7 +33,7 @@ public class SoundRecyclerViewAdapter extends RecyclerView.Adapter<SoundRecycler
|
|||||||
private final int[] colors;
|
private final int[] colors;
|
||||||
private Activity activity;
|
private Activity activity;
|
||||||
|
|
||||||
public SoundRecyclerViewAdapter(Context context, List<Category> categoryList, Activity activity) {
|
public SoundRecyclerViewAdapter(Context context, List<Category> categoryList,Activity activity) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.categoryList = categoryList;
|
this.categoryList = categoryList;
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
@ -94,18 +94,18 @@ public class SoundRecyclerViewAdapter extends RecyclerView.Adapter<SoundRecycler
|
|||||||
|
|
||||||
holder.imageView.setOnClickListener(v -> {
|
holder.imageView.setOnClickListener(v -> {
|
||||||
// 调用 showAd 方法并在广告播放完成后进行跳转
|
// 调用 showAd 方法并在广告播放完成后进行跳转
|
||||||
showAdAndNavigate(currentColor, category);
|
showAdAndNavigate(currentColor,category);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showAdAndNavigate(int currentColor, Category category) {
|
private void showAdAndNavigate(int currentColor,Category category) {
|
||||||
AdManager.showTopOn(activity, new onActionListener() {
|
AdManager.showTopOn(activity, new onActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAction() {
|
public void onAction() {
|
||||||
Intent intent = new Intent(context, AirHornActivity.class);
|
Intent intent = new Intent(context, AirHornActivity.class);
|
||||||
intent.putExtra("color", currentColor); // 添加颜色值到 Intent
|
intent.putExtra("color", currentColor); // 添加颜色值到 Intent
|
||||||
intent.putExtra("123", category);
|
intent.putExtra("123",category);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.sound.prankparty.topon;
|
package com.sound.prankparty.topon;
|
||||||
|
|
||||||
|
|
||||||
public interface AdListener {
|
public interface AdListener {
|
||||||
void loadFail(String placeId);
|
void loadFail(String placeId);
|
||||||
void showSuccess();
|
void showSuccess();
|
||||||
|
|||||||
@ -49,16 +49,16 @@ public class AdManager {
|
|||||||
|
|
||||||
public static void loadAllAd() {
|
public static void loadAllAd() {
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
ATInterstitial mInterstitialAd1 = new ATInterstitial(MainApplication.getContext(), place1Id);
|
ATInterstitial mInterstitialAd1 = new ATInterstitial(MainApplication.mContext, place1Id);
|
||||||
ATInterstitial mInterstitialAd2 = new ATInterstitial(MainApplication.getContext(), place2Id);
|
ATInterstitial mInterstitialAd2 = new ATInterstitial(MainApplication.mContext, place2Id);
|
||||||
ATInterstitial mInterstitialAd3 = new ATInterstitial(MainApplication.getContext(), place3Id);
|
ATInterstitial mInterstitialAd3 = new ATInterstitial(MainApplication.mContext, place3Id);
|
||||||
list.add(mInterstitialAd1);
|
list.add(mInterstitialAd1);
|
||||||
list.add(mInterstitialAd2);
|
list.add(mInterstitialAd2);
|
||||||
list.add(mInterstitialAd3);
|
list.add(mInterstitialAd3);
|
||||||
}
|
}
|
||||||
for (ATInterstitial ad : list) {
|
for (ATInterstitial ad : list) {
|
||||||
if (!ad.isAdReady()) {
|
if (!ad.isAdReady()) {
|
||||||
setCallBack(ad, new AdListener() {
|
setCallBack(ad, new com.sound.prankparty.topon.AdListener() {
|
||||||
@Override
|
@Override
|
||||||
public void loadFail(@NonNull String placeId) {
|
public void loadFail(@NonNull String placeId) {
|
||||||
if (placeId.equals(place1Id)) {
|
if (placeId.equals(place1Id)) {
|
||||||
@ -106,7 +106,7 @@ public class AdManager {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setCallBack(ATInterstitial ad, AdListener listener) {
|
private static void setCallBack(ATInterstitial ad, com.sound.prankparty.topon.AdListener listener) {
|
||||||
ad.setAdListener(new ATInterstitialListener() {
|
ad.setAdListener(new ATInterstitialListener() {
|
||||||
|
|
||||||
|
|
||||||
@ -155,8 +155,7 @@ public class AdManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setAlreadyShow(){
|
||||||
public static void setAlreadyShow(){
|
|
||||||
alreadyShow = false;
|
alreadyShow = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,8 +163,8 @@ public class AdManager {
|
|||||||
public static CountDownTimer showWelcomeAd(
|
public static CountDownTimer showWelcomeAd(
|
||||||
Activity activity,
|
Activity activity,
|
||||||
Long totalTim,
|
Long totalTim,
|
||||||
CountAction countAction,
|
com.sound.prankparty.topon.CountAction countAction,
|
||||||
GoMainAction goMain
|
com.sound.prankparty.topon.GoMainAction goMain
|
||||||
) {
|
) {
|
||||||
|
|
||||||
CountDownTimer timer = new CountDownTimer(totalTim, 100) {
|
CountDownTimer timer = new CountDownTimer(totalTim, 100) {
|
||||||
@ -173,7 +172,7 @@ public class AdManager {
|
|||||||
public void onTick(long millisUntilFinished) {
|
public void onTick(long millisUntilFinished) {
|
||||||
countAction.onCount(millisUntilFinished);
|
countAction.onCount(millisUntilFinished);
|
||||||
if (!alreadyShow) {
|
if (!alreadyShow) {
|
||||||
showAD(activity, new AdStatusAction() {
|
showAD(activity, new com.sound.prankparty.topon.AdStatusAction() {
|
||||||
@Override
|
@Override
|
||||||
public void onStatus(int adType) {
|
public void onStatus(int adType) {
|
||||||
if (adType == type_has_cache) {
|
if (adType == type_has_cache) {
|
||||||
@ -191,7 +190,7 @@ public class AdManager {
|
|||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
if (!alreadyShow) {
|
if (!alreadyShow) {
|
||||||
showTopOn(activity, new onActionListener() {
|
showTopOn(activity, new com.sound.prankparty.topon.onActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAction() {
|
public void onAction() {
|
||||||
goMain.onGo();
|
goMain.onGo();
|
||||||
@ -207,11 +206,11 @@ public class AdManager {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static void showAD(Activity activity, AdStatusAction action) {
|
private static void showAD(Activity activity, com.sound.prankparty.topon.AdStatusAction action) {
|
||||||
ATInterstitial readyAd = getReadyAd();
|
ATInterstitial readyAd = getReadyAd();
|
||||||
if (readyAd != null) {
|
if (readyAd != null) {
|
||||||
action.onStatus(type_has_cache);
|
action.onStatus(type_has_cache);
|
||||||
setCallBack(readyAd, new AdListener() {
|
setCallBack(readyAd, new com.sound.prankparty.topon.AdListener() {
|
||||||
@Override
|
@Override
|
||||||
public void loadFail(@NonNull String placeId) {
|
public void loadFail(@NonNull String placeId) {
|
||||||
|
|
||||||
@ -240,8 +239,8 @@ public class AdManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void showTopOn(Activity activity, onActionListener listener) {
|
public static void showTopOn(Activity activity,onActionListener listener) {
|
||||||
showAD(activity, new AdStatusAction() {
|
showAD(activity, new com.sound.prankparty.topon.AdStatusAction() {
|
||||||
@Override
|
@Override
|
||||||
public void onStatus(int adType) {
|
public void onStatus(int adType) {
|
||||||
if (adType == type_no_cache || adType == type_show_close || adType == type_show_fail) {
|
if (adType == type_no_cache || adType == type_show_close || adType == type_show_fail) {
|
||||||
|
|||||||
@ -2,8 +2,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.9.0" apply false
|
id("org.jetbrains.kotlin.android") version "1.9.0" apply false
|
||||||
|
id("com.google.gms.google-services") version "4.4.2" apply false
|
||||||
|
id ("com.google.firebase.crashlytics") version "3.0.2" apply false
|
||||||
}
|
}
|
||||||
buildscript {
|
buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6,7 +6,7 @@
|
|||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
|
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. For more details, visit
|
# This option should only be used with decoupled projects. For more details, visit
|
||||||
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
||||||
|
|||||||
@ -39,6 +39,7 @@ dependencyResolutionManagement {
|
|||||||
|
|
||||||
//TopOn集成测试工具
|
//TopOn集成测试工具
|
||||||
// maven ( "https://jfrog.anythinktech.com/artifactory/debugger")
|
// maven ( "https://jfrog.anythinktech.com/artifactory/debugger")
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user