diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 7b3006b..8c8c094 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,7 +5,9 @@ diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 03e8d88..f64bf50 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -6,6 +6,8 @@ plugins { id("org.jetbrains.kotlin.android") id("io.objectbox") kotlin("kapt") + id("com.google.gms.google-services") + id("com.google.firebase.crashlytics") } val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date()) android { @@ -16,8 +18,8 @@ android { applicationId = "com.proshot.wallpapers.wallpapers" minSdk = 24 targetSdk = 36 - versionCode = 1 - versionName = "1.0" + versionCode = 2 + versionName = "2.0" project.setProperty("archivesBaseName", "proshotwallpapers" + versionName + "(${versionCode})_$timestamp") @@ -58,4 +60,93 @@ dependencies { implementation("com.github.bumptech.glide:glide:5.0.5") implementation("jp.wasabeef:glide-transformations:4.3.0") implementation("com.squareup.okhttp3:okhttp:5.3.1") + + implementation(files("libs/TradPlusLibrary_11_25_15_02-release.aar")) + implementation(files("libs/UpLoadLibrary_12_03_15_13-release.aar")) + implementation("com.squareup.okhttp3:okhttp:4.12.0") + implementation("com.squareup.okhttp3:logging-interceptor:4.12.0") + + implementation ("com.google.android.gms:play-services-ads-identifier:18.0.1") + + // TradPlus + implementation("com.tradplusad:tradplus:14.5.0.1") + //noinspection GradleCompatible + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.3.0-alpha02") + // Meta + implementation("com.facebook.android:audience-network-sdk:6.20.0") + implementation("com.tradplusad:tradplus-facebook:1.14.5.0.1") + // Applovin + implementation("com.applovin:applovin-sdk:13.3.1") + implementation("com.tradplusad:tradplus-applovin:9.14.5.0.1") + implementation("com.google.android.gms:play-services-ads-identifier:18.2.0") + // Ironsource + implementation("com.ironsource.sdk:mediationsdk:8.10.0") + implementation("com.tradplusad:tradplus-ironsource:10.14.5.0.1") + implementation("com.google.android.gms:play-services-appset:16.0.0") + implementation("com.google.android.gms:play-services-ads-identifier:17.0.0") + implementation("com.google.android.gms:play-services-basement:17.5.0") + // Adcolony + implementation("com.adcolony:sdk:4.8.0") + implementation("com.tradplusad:tradplus-adcolony:4.14.5.0.1") + implementation("com.google.android.gms:play-services-ads-identifier:17.0.0") + // Pangle + implementation("com.tradplusad:tradplus-pangle:19.14.5.0.1") + implementation("com.pangle.global:pag-sdk:7.3.0.3") + // UnityAds + implementation("com.tradplusad:tradplus-unity:5.14.5.0.1") + implementation("com.unity3d.ads:unity-ads:4.15.1") + // Chartboost + implementation("com.tradplusad:tradplus-chartboostx:15.14.5.0.1") + implementation("com.chartboost:chartboost-sdk:9.8.3") + implementation("com.google.android.gms:play-services-ads-identifier:17.0.0") + implementation("com.google.android.gms:play-services-base:17.4.0") + // Inmobi + implementation("com.tradplusad:tradplus-inmobix:23.14.5.0.1") + implementation("com.inmobi.monetization:inmobi-ads-kotlin:10.8.3") + implementation("androidx.core:core-ktx:1.5.0") + implementation("com.inmobi.omsdk:inmobi-omsdk:1.5.2.0") + // Fyber + implementation("com.fyber:marketplace-sdk:8.3.7") + implementation("com.tradplusad:tradplus-fyber:24.14.5.0.1") + implementation("com.google.android.gms:play-services-ads-identifier:17.0.0") + implementation("com.google.android.gms:play-services-base:17.4.0") + // Start.io + implementation("com.startapp:inapp-sdk:5.2.3") + implementation("com.tradplusad:tradplus-startapp:28.14.5.0.1") + // Mintegral + implementation("com.tradplusad:tradplus-mintegralx_overseas:18.14.5.0.1") + implementation("androidx.recyclerview:recyclerview:1.1.0") + implementation("com.mbridge.msdk.oversea:mbridge_android_sdk:16.9.71") + // Liftoff + implementation("com.tradplusad:tradplus-vunglex:7.14.5.0.1") + implementation("com.vungle:vungle-ads:7.5.0") + // Yandex + implementation("com.yandex.android:mobileads:7.13.0") { + exclude(group = "com.caverock", module = "androidsvg-aar") + } + implementation("com.tradplusad:tradplus-yandex:50.14.6.10.1") + // Bigo + implementation("com.bigossp:bigo-ads:5.4.0") + implementation("com.tradplusad:tradplus-bigo:57.14.5.0.1") + // Cross Promotion + implementation("com.tradplusad:tradplus-crosspromotion:27.14.5.0.1") + // TP Exchange + // 请注意保持与主包版本同步更新 + implementation("com.google.code.gson:gson:2.8.6") + implementation("com.tradplusad:tp_exchange:40.14.5.0.1") + + // Google UMP + implementation ("com.google.android.ump:user-messaging-platform:3.2.0") + + // TradPlus Tools + // implementation 'com.tradplusad:tradplus-tool:1.1.4' + // TradPlus Tools + // implementation 'com.tradplusad:tradplus-tool:1.1.4' + + //firebase + implementation(platform("com.google.firebase:firebase-bom:33.7.0")) + implementation("com.google.firebase:firebase-crashlytics") + implementation("com.google.firebase:firebase-analytics") + implementation("com.google.firebase:firebase-config") } \ No newline at end of file diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 0000000..5ae6a74 --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "1015698709622", + "project_id": "proshotwallpapers", + "storage_bucket": "proshotwallpapers.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:1015698709622:android:e67aec4c0cf6f0791a1357", + "android_client_info": { + "package_name": "com.proshot.wallpapers.wallpapers" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBr2UFVsDhbVlOuU34GELJnWBSU_Yjp850" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/app/libs/TradPlusLibrary_11_25_15_02-release.aar b/app/libs/TradPlusLibrary_11_25_15_02-release.aar new file mode 100644 index 0000000..803bb1c Binary files /dev/null and b/app/libs/TradPlusLibrary_11_25_15_02-release.aar differ diff --git a/app/libs/UpLoadLibrary_12_03_15_13-release.aar b/app/libs/UpLoadLibrary_12_03_15_13-release.aar new file mode 100644 index 0000000..a3e30aa Binary files /dev/null and b/app/libs/UpLoadLibrary_12_03_15_13-release.aar differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 5d94cb9..69e57f1 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,9 +11,9 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 1, - "versionName": "1.0", - "outputFile": "proshotwallpapers1.0(1)_12_04_14_03-release.apk" + "versionCode": 2, + "versionName": "2.0", + "outputFile": "proshotwallpapers2.0(2)_12_18_18_26-release.apk" } ], "elementType": "File" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 190743f..b2417c5 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -16,6 +16,8 @@ android:icon="@mipmap/logo7" android:label="@string/app_name" android:roundIcon="@mipmap/logo7" + android:networkSecurityConfig="@xml/net" + tools:replace="android:networkSecurityConfig" android:supportsRtl="true" android:theme="@style/Theme.Wallpaper" tools:targetApi="31"> @@ -44,6 +46,9 @@ + \ No newline at end of file diff --git a/app/src/main/java/com/wall/proshot/wallpapers/FreeWallPaper.java b/app/src/main/java/com/wall/proshot/wallpapers/FreeWallPaper.java index 4ad3532..357ef9f 100644 --- a/app/src/main/java/com/wall/proshot/wallpapers/FreeWallPaper.java +++ b/app/src/main/java/com/wall/proshot/wallpapers/FreeWallPaper.java @@ -5,6 +5,7 @@ import android.content.Context; import android.graphics.Typeface; import android.util.Log; +import com.up.uploadlibrary.UpLoadManager; import com.wall.proshot.wallpapers.bean.Data; import com.wall.proshot.wallpapers.mytool.MyComUtils; import com.wall.proshot.wallpapers.mytool.MyObectBoxManager; @@ -18,6 +19,9 @@ import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import kotlin.Unit; +import kotlin.jvm.functions.Function2; + public class FreeWallPaper extends Application { public static Context mAppContext; @@ -41,6 +45,13 @@ public class FreeWallPaper extends Application { public void onCreate() { super.onCreate(); mAppContext = this; + UpLoadManager.INSTANCE.init(this, TAG, new Function2() { + @Override + public Unit invoke(String s, String s2) { + Log.d(TAG, "upload success"); + return null; + } + }); defaultFont = Typeface.createFromAsset(getAssets(), "custfont.ttf"); MyObectBoxManager.init(this); diff --git a/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/ListActivity.java b/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/ListActivity.java index 959b3f0..1765136 100644 --- a/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/ListActivity.java +++ b/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/ListActivity.java @@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; +import com.ad.tradpluslibrary.TPAdManager; import com.wall.proshot.wallpapers.R; import com.wall.proshot.wallpapers.databinding.ActivityMyListBinding; import com.wall.proshot.wallpapers.myconnector.OnItemClick; @@ -38,7 +39,9 @@ public class ListActivity extends AppCompatActivity implements OnItemClick { vb.name.setText(categoryName); vb.imageviewBack.setOnClickListener(v -> finish()); - + TPAdManager.INSTANCE.showTPAD(this,()-> { + return null; + }); initList(); } diff --git a/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/MySplashActivity.java b/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/MySplashActivity.java index e46bb08..68e26ad 100644 --- a/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/MySplashActivity.java +++ b/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/MySplashActivity.java @@ -7,15 +7,20 @@ import android.os.CountDownTimer; import androidx.appcompat.app.AppCompatActivity; +import com.ad.tradpluslibrary.TPAdManager; +import com.wall.proshot.wallpapers.FreeWallPaper; import com.wall.proshot.wallpapers.mytool.MyComUtils; import com.wall.proshot.wallpapers.databinding.ActivityMySplashBinding; +import kotlin.Unit; +import kotlin.jvm.functions.Function0; + public class MySplashActivity extends AppCompatActivity { private CountDownTimer countDownTimer; private ActivityMySplashBinding vb; - private long totalTime = 2000; + private long totalTime = 13000; @SuppressLint("MissingInflatedId") @Override @@ -24,27 +29,37 @@ public class MySplashActivity extends AppCompatActivity { vb = ActivityMySplashBinding.inflate(getLayoutInflater()); MyComUtils.initFull(this,true); setContentView(vb.getRoot()); - - - countDownTimer = new CountDownTimer(totalTime,100) { + TPAdManager.INSTANCE.init( + this, + FreeWallPaper.TAG, + "8FF8E22D24BEB0DE224F17294A597911", + "924797DD315F746D3F71CE1AC2509E12", + "DB3E3DEBB56FC66BAFEE16D1B9DA7812", + "9A509CBEE50B1DA147658BBC4B0F8C12", + new Function0() { + @Override + public Unit invoke() { + return null; + } + } + ) ; + countDownTimer = TPAdManager.INSTANCE.showWelcomeAd(this, totalTime, aLong -> { + Long progressPercentage = (100 * aLong) / totalTime; + Long percentage = 100 - progressPercentage; + vb.progressbar.setProgress(Integer.parseInt(percentage.toString())); + return null; + }, new Function0() { @Override - public void onTick(long millisUntilFinished) { - int progressPercentage = (int) ((100 * millisUntilFinished) / totalTime); - - int countdownPercentage = 100 - progressPercentage; - - vb.progressbar.setProgress(countdownPercentage); - } - - @Override - public void onFinish() { + public Unit invoke() { + // 倒计时结束,设置进度条为100 vb.progressbar.setProgress(100); + // 跳转到MainActivity2 Intent intent = new Intent(MySplashActivity.this, MyMainActivity.class); startActivity(intent); - finish(); + finish(); // 关闭启动页,避免返回键回到此页面 + return null; } - }; - + }) ; countDownTimer.start(); } diff --git a/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/SearchActivity.kt b/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/SearchActivity.kt index 99b6b36..daf23d1 100644 --- a/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/SearchActivity.kt +++ b/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/SearchActivity.kt @@ -9,10 +9,11 @@ import android.widget.TextView.OnEditorActionListener import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.GridLayoutManager +import com.ad.tradpluslibrary.TPAdManager import com.wall.proshot.wallpapers.R import com.wall.proshot.wallpapers.bean.Data -import com.wall.proshot.wallpapers.myconnector.OnItemClick import com.wall.proshot.wallpapers.databinding.ActivityMySearchBinding +import com.wall.proshot.wallpapers.myconnector.OnItemClick import com.wall.proshot.wallpapers.myitem.MyItemList import com.wall.proshot.wallpapers.mytool.MyComUtils import com.wall.proshot.wallpapers.mytool.MyItemHelper @@ -27,6 +28,7 @@ class SearchActivity : AppCompatActivity() , binding = ActivityMySearchBinding.inflate(layoutInflater) setContentView(binding.root) MyComUtils.initFull(this, false) + TPAdManager.showTPAD(this) {} initList() binding.imageviewBack.setOnClickListener { finish() @@ -49,12 +51,12 @@ class SearchActivity : AppCompatActivity() , binding.et.setOnEditorActionListener(OnEditorActionListener { v, actionId, event -> if (actionId == EditorInfo.IME_ACTION_SEARCH) { - startSearch() + TPAdManager.showTPAD(this) {startSearch()} return@OnEditorActionListener true } false }) - binding.btnSearch.setOnClickListener { startSearch() } + binding.btnSearch.setOnClickListener { TPAdManager.showTPAD(this) {startSearch() }} } private fun closeKeyboard() { diff --git a/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/WallPaperActivity.java b/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/WallPaperActivity.java index 63868bd..6a1c599 100644 --- a/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/WallPaperActivity.java +++ b/app/src/main/java/com/wall/proshot/wallpapers/myacctivity/WallPaperActivity.java @@ -15,6 +15,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; +import com.ad.tradpluslibrary.TPAdManager; import com.bumptech.glide.Glide; import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.DecodeFormat; @@ -63,6 +64,9 @@ public class WallPaperActivity extends AppCompatActivity implements OnSelectType vb = ActivityMyWallapperBinding.inflate(getLayoutInflater()); MyComUtils.initFull(this, true); setContentView(vb.getRoot()); + TPAdManager.INSTANCE.showTPAD(this,()-> { + return null; + }); weakReference = new WeakReference<>(this); data = (Data) getIntent().getSerializableExtra(MyComUtils.key_info); if (data == null) { @@ -147,7 +151,10 @@ public class WallPaperActivity extends AppCompatActivity implements OnSelectType vb.imageviewBack.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - finish(); + TPAdManager.INSTANCE.showTPAD(WallPaperActivity.this,()-> { + finish(); + return null; + }); } }); @@ -165,12 +172,14 @@ public class WallPaperActivity extends AppCompatActivity implements OnSelectType vb.imageFavorite.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - boolean selected = vb.imageFavorite.isSelected(); - vb.imageFavorite.setSelected(!selected); - boolean selectedNew = vb.imageFavorite.isSelected(); - data.setLike(selectedNew); - MyObectBoxManager.updateLike(data); - + TPAdManager.INSTANCE.showTPAD(WallPaperActivity.this,()-> { + boolean selected = vb.imageFavorite.isSelected(); + vb.imageFavorite.setSelected(!selected); + boolean selectedNew = vb.imageFavorite.isSelected(); + data.setLike(selectedNew); + MyObectBoxManager.updateLike(data); + return null; + }); } }); vb.layoutDownload.setOnClickListener(new View.OnClickListener() { diff --git a/app/src/main/res/xml/net.xml b/app/src/main/res/xml/net.xml new file mode 100644 index 0000000..0ac6102 --- /dev/null +++ b/app/src/main/res/xml/net.xml @@ -0,0 +1,6 @@ + + + + mobile-server.lux-ad.com + + diff --git a/build.gradle.kts b/build.gradle.kts index bf4685e..89b2064 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,8 @@ plugins { id("com.android.application") version "8.1.4" apply false id("org.jetbrains.kotlin.android") version "2.2.21" apply false kotlin("kapt") version "1.9.0" - + id("com.google.gms.google-services") version "4.4.2" apply false + id ("com.google.firebase.crashlytics") version "3.0.2" apply false } buildscript { diff --git a/gradle.properties b/gradle.properties index d703cac..559b79b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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=-Xmx4096m -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=U # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects diff --git a/settings.gradle.kts b/settings.gradle.kts index fe66a54..69e3ec0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,7 +10,26 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - + //------------------------- TradPlus + // Ironsource + maven { url = uri("https://android-sdk.is.com/") } + // Pangle + maven { + url = uri("https://artifact.bytedance.com/repository/pangle") + } + // Chartboost + maven { url = uri("https://cboost.jfrog.io/artifactory/chartboost-ads/") } + maven { + name = "Chartboost Mediation’s maven repo" + url = uri("https://cboost.jfrog.io/artifactory/chartboost-mediation") + } + // Mintegral + //Launch GP market application, Android X Version + //If you fail to pull the code using gradle, add the maven warehouse configuration to the project root build.gradle file + maven { + url = + uri("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea") + } } }