Compare commits

..

1 Commits
max ... main

Author SHA1 Message Date
lihongwei
08ffb4b752 V1.0.3(11) max改为topon 2024-10-16 16:03:06 +08:00
20 changed files with 51 additions and 116 deletions

Binary file not shown.

View File

@ -8,8 +8,6 @@ daaea35726ab7cd457ab61d4538fb822
1be9e72506f3307ce6a9e78d26d65bd0
7eac188d3286b05ccbba774f63a2c049
4df96d3bc9afd17b812e65e6c6add1ef
becf75b2cc99e82716da2e6697879509
7eec7b9476b99b3ce94533da4f2eb987
974322f19d813702ea048d95288d2b8c
29015bbfcc182d80e7f75bd2c38e4521
dd2971b0681141d57b221687791ad1bd

Binary file not shown.

Binary file not shown.

View File

@ -1,2 +1,2 @@
#Fri Oct 18 17:36:45 CST 2024
json=1556480289
#Sat Oct 12 11:00:37 CST 2024
json=-780482554

View File

@ -1,6 +1,5 @@
#
#Fri Oct 18 17:36:45 CST 2024
C8XiiEAUrUDh6nWnlsJz8iEhrTyNLUctJ_xGloqZJHwJINes1b_Md0rTpgbdETXAq9eH5RVsJqqNTILCA2qnbA=i4k2zRVkJrBdZ2AlcVyiG2B1feL1OvMldT2ea5279uyuoGXtC_5uGTbx7Up_JehNT_K0TmZK42hpEAFFwlHLEb
#Sat Oct 12 11:00:37 CST 2024
sdk_analysis_plugin_version=5.5.0
set_multidex=true
y87o4e7vb5bbqzuGVTFyOIfZiyBG0Nf0Ksq8S3m2MJOHf_A5BcWGJnKuQqoxwxVvtdQdiTC4O3MPzFwy8rJ9Cc=3cUMfTcsZKzlJevxK4IkNysgDAeQA4B5w332p3g8B9ZAgC54WQNZLVxuxnCx4sCHA5StLJnDTAFa68mFTi8rd8

View File

@ -6,8 +6,6 @@ plugins {
alias(libs.plugins.android.application)
id("org.jetbrains.kotlin.android")
id ("kotlin-kapt")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
}
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
@ -25,8 +23,8 @@ android {
applicationId = "com.sound.prankparty"
minSdk = 23
targetSdk = 34
versionCode = 14
versionName = "1.0.5"
versionCode = 11
versionName = "1.0.3"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@ -69,10 +67,6 @@ dependencies {
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)
@ -164,5 +158,4 @@ dependencies {
//----------------------------------------------TopOn
}

View File

@ -1,29 +0,0 @@
{
"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"
}

View File

@ -168,3 +168,6 @@
-keep class com.chartboost.** { *; }
#---------------------------------------------Topon

View File

@ -6,37 +6,29 @@ import android.util.Log;
import com.anythink.core.api.ATSDK;
import com.anythink.core.api.NetTrafficeCallback;
import com.sound.prankparty.topon.AdManager;
public class MainApplication extends Application {
/**
* 全局的上下文
*/
public static Context mContext;
private static Context mContext;
public static final String TAG = "--------------";
public static final String AD_BROADCAST = "on_success_action";
public static Boolean initSDK = false;
private static final String AppKey = "a26e024a9bca8b461e84fa4d8897106d1";
private static final String APPId = "h670f347749ff5";
public static String TAG = "-------Prank----------";
@Override
public void onCreate() {
super.onCreate();
//获取应用的上下文并赋值给 mContext
mContext = getApplicationContext();
// // 确保Firebase初始化
// FirebaseApp.initializeApp(this);
//
// // 输出日志以确认Firebase初始化
// if (!FirebaseApp.getApps(this).isEmpty()) {
// Log.d(TAG, "Firebase 初始化成功");
// } else {
// Log.e(TAG, "Firebase 初始化失败");
// }
initSdk();
}
@ -76,11 +68,10 @@ public class MainApplication extends Application {
}
});
ATSDK.init( this, APPId, AppKey);
com.sound.prankparty.topon.AdManager.loadAllAd();
ATSDK.init(this, APPId, AppKey);
AdManager.loadAllAd();
//测试工具
// ATDebuggerUITest.showDebuggerUI(this,debug_KEy);
// ATDebuggerUITest.showDebuggerUI(this,"a8dd4a3f1c38a5a3cadb4f39385fb682af63df07");
}

View File

@ -52,7 +52,7 @@ public class AirHornActivity extends AppCompatActivity {
@Override
public void onClick(View v) {
showAd(new onActionListener() {
AdManager.showTopOn(AirHornActivity.this,new onActionListener() {
@Override
public void onAction() {
@ -71,7 +71,7 @@ public class AirHornActivity extends AppCompatActivity {
@Override
public void onBackPressed() {
super.onBackPressed();
showAd(new onActionListener() {
AdManager.showTopOn(this, new onActionListener() {
@Override
public void onAction() {
finish();
@ -79,14 +79,5 @@ public class AirHornActivity extends AppCompatActivity {
});
}
private void showAd(onActionListener listener) {
AdManager.showTopOn(this, new onActionListener() {
@Override
public void onAction() {
listener.onAction();
}
});
}
}

View File

@ -4,10 +4,12 @@ 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;
@ -71,7 +73,7 @@ public class PlaySoundActivity extends AppCompatActivity {
binding.back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showAd(new onActionListener() {
AdManager.showTopOn(PlaySoundActivity.this,new onActionListener() {
@Override
public void onAction() {
finish();
@ -300,7 +302,7 @@ public class PlaySoundActivity extends AppCompatActivity {
@Override
public void onBackPressed() {
super.onBackPressed();
showAd(new onActionListener() {
AdManager.showTopOn(this,new onActionListener() {
@Override
public void onAction() {
finish();
@ -308,14 +310,5 @@ public class PlaySoundActivity extends AppCompatActivity {
});
}
private void showAd(onActionListener listener) {
AdManager.showTopOn(this, new onActionListener() {
@Override
public void onAction() {
listener.onAction();
}
});
}
}

View File

@ -13,7 +13,7 @@ import com.sound.prankparty.topon.AdManager;
public class SplashActivity extends AppCompatActivity {
private ActivitySplashBinding binding;
private long timer = 12000;
private static final long totalTime = 11000; // 倒计时总时间
private CountDownTimer countDownTimer;
@Override
@ -23,27 +23,27 @@ public class SplashActivity extends AppCompatActivity {
binding = ActivitySplashBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
AdManager.loadAllAd();
// 使用 ViewBinding 引用 progressBar
ProgressBar progressBar = binding.progressBar;
AdManager.setAlreadyShow();
countDownTimer = AdManager.showWelcomeAd(this, timer, millisUntilFinished -> {
int percentage = (int) (100 - (float) millisUntilFinished / timer * 100);
progressBar.setProgress(percentage);
},
countDownTimer = AdManager.showWelcomeAd(this, totalTime, millisUntilFinished -> {
int percentage = (int) (100 - (float) millisUntilFinished / totalTime * 100);
progressBar.setProgress(percentage);
},
this::startMain // 倒计时结束或广告展示结束时跳转主界面
);
countDownTimer.start();
}
// 跳转到主界面的方法
private void startMain() {
// 确保进度条更新至满值
binding.progressBar.setProgress(100);
// 跳转到主界面
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
startActivity(intent);
finish();

View File

@ -20,10 +20,10 @@ 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.topon.AdManager;
import com.sound.prankparty.topon.onActionListener;
import java.util.List;
public class AirHornRecyclerViewAdapter extends RecyclerView.Adapter<AirHornRecyclerViewAdapter.AirhonrViewHolder> {

View File

@ -33,7 +33,7 @@ public class SoundRecyclerViewAdapter extends RecyclerView.Adapter<SoundRecycler
private final int[] colors;
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.categoryList = categoryList;
this.activity = activity;
@ -94,18 +94,18 @@ public class SoundRecyclerViewAdapter extends RecyclerView.Adapter<SoundRecycler
holder.imageView.setOnClickListener(v -> {
// 调用 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() {
@Override
public void onAction() {
Intent intent = new Intent(context, AirHornActivity.class);
intent.putExtra("color", currentColor); // 添加颜色值到 Intent
intent.putExtra("123",category);
intent.putExtra("123", category);
context.startActivity(intent);
}
});

View File

@ -1,6 +1,5 @@
package com.sound.prankparty.topon;
public interface AdListener {
void loadFail(String placeId);
void showSuccess();

View File

@ -49,16 +49,16 @@ public class AdManager {
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);
ATInterstitial mInterstitialAd1 = new ATInterstitial(MainApplication.getContext(), place1Id);
ATInterstitial mInterstitialAd2 = new ATInterstitial(MainApplication.getContext(), place2Id);
ATInterstitial mInterstitialAd3 = new ATInterstitial(MainApplication.getContext(), 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() {
setCallBack(ad, new AdListener() {
@Override
public void loadFail(@NonNull String placeId) {
if (placeId.equals(place1Id)) {
@ -106,7 +106,7 @@ public class AdManager {
return null;
}
private static void setCallBack(ATInterstitial ad, com.sound.prankparty.topon.AdListener listener) {
private static void setCallBack(ATInterstitial ad, AdListener listener) {
ad.setAdListener(new ATInterstitialListener() {
@ -155,7 +155,8 @@ public class AdManager {
});
}
public static void setAlreadyShow(){
public static void setAlreadyShow(){
alreadyShow = false;
}
@ -163,8 +164,8 @@ public class AdManager {
public static CountDownTimer showWelcomeAd(
Activity activity,
Long totalTim,
com.sound.prankparty.topon.CountAction countAction,
com.sound.prankparty.topon.GoMainAction goMain
CountAction countAction,
GoMainAction goMain
) {
CountDownTimer timer = new CountDownTimer(totalTim, 100) {
@ -172,7 +173,7 @@ public class AdManager {
public void onTick(long millisUntilFinished) {
countAction.onCount(millisUntilFinished);
if (!alreadyShow) {
showAD(activity, new com.sound.prankparty.topon.AdStatusAction() {
showAD(activity, new AdStatusAction() {
@Override
public void onStatus(int adType) {
if (adType == type_has_cache) {
@ -190,7 +191,7 @@ public class AdManager {
@Override
public void onFinish() {
if (!alreadyShow) {
showTopOn(activity, new com.sound.prankparty.topon.onActionListener() {
showTopOn(activity, new onActionListener() {
@Override
public void onAction() {
goMain.onGo();
@ -206,11 +207,11 @@ public class AdManager {
private static void showAD(Activity activity, com.sound.prankparty.topon.AdStatusAction action) {
private static void showAD(Activity activity, AdStatusAction action) {
ATInterstitial readyAd = getReadyAd();
if (readyAd != null) {
action.onStatus(type_has_cache);
setCallBack(readyAd, new com.sound.prankparty.topon.AdListener() {
setCallBack(readyAd, new AdListener() {
@Override
public void loadFail(@NonNull String placeId) {
@ -239,8 +240,8 @@ public class AdManager {
}
public static void showTopOn(Activity activity,onActionListener listener) {
showAD(activity, new com.sound.prankparty.topon.AdStatusAction() {
public static void showTopOn(Activity activity, onActionListener listener) {
showAD(activity, new AdStatusAction() {
@Override
public void onStatus(int adType) {
if (adType == type_no_cache || adType == type_show_close || adType == type_show_fail) {

View File

@ -2,11 +2,8 @@
plugins {
alias(libs.plugins.android.application) 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 {
dependencies {
}
}

View File

@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects

View File

@ -39,7 +39,6 @@ dependencyResolutionManagement {
//TopOn集成测试工具
// maven ( "https://jfrog.anythinktech.com/artifactory/debugger")
}
}